[devhelp] config.h: always #define FLATPAK_BUILD (with 0 or 1)
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] config.h: always #define FLATPAK_BUILD (with 0 or 1)
- Date: Sat, 4 Apr 2020 00:41:20 +0000 (UTC)
commit c56e1ed62a2fec91fb26c92bd48ab49fd88ad198
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Apr 4 02:37:47 2020 +0200
config.h: always #define FLATPAK_BUILD (with 0 or 1)
#ifdef is not guaranteed to work as expected if the config.h is not
included. #if gives an error in that case.
devhelp/dh-book-list-builder.c | 4 ++--
meson.build | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/devhelp/dh-book-list-builder.c b/devhelp/dh-book-list-builder.c
index 3e56e0ba..0936e1b7 100644
--- a/devhelp/dh-book-list-builder.c
+++ b/devhelp/dh-book-list-builder.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* SPDX-FileCopyrightText: 2018 Sébastien Wilmet <swilmet gnome org>
+/* SPDX-FileCopyrightText: 2018-2020 Sébastien Wilmet <swilmet gnome org>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
@@ -191,7 +191,7 @@ dh_book_list_builder_add_default_sub_book_lists (DhBookListBuilder *builder)
*
* https://bugzilla.gnome.org/show_bug.cgi?id=792068
*/
-#ifdef FLATPAK_BUILD
+#if FLATPAK_BUILD
add_default_sub_book_lists_in_data_dir (builder, "/run/host/usr/share");
#endif
}
diff --git a/meson.build b/meson.build
index 29796f08..a36516ed 100644
--- a/meson.build
+++ b/meson.build
@@ -74,7 +74,7 @@ config_data.set_quoted('DATADIR', get_option('prefix') / get_option('datadir'))
config_data.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
config_data.set_quoted('PACKAGE_VERSION', meson.project_version())
config_data.set_quoted('LIBDEVHELP_API_VERSION', LIBDEVHELP_API_VERSION)
-config_data.set('FLATPAK_BUILD', get_option('flatpak_build'))
+config_data.set10('FLATPAK_BUILD', get_option('flatpak_build'))
configure_file(
output: 'config.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]