From 69c4737491a3cdb484eaa932f2fa5cb2153377f5 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 16 Oct 2017 15:51:40 +0000 Subject: [PATCH] build: Define OSTREE_ENABLE_EXPERIMENTAL_API for g-ir-scanner When compiling libostree, OSTREE_ENABLE_EXPERIMENTAL_API is managed via config.h. However, g-ir-scanner can't use that since it gets confused about the namespace of all the random macros. It won't include the experimental APIs unless the macro is defined through another means. Without this, none of the experimental APIs were being included in the gir data. Closes: #1322 Approved by: pwithnall --- Makefile-libostree.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile-libostree.am b/Makefile-libostree.am index f8376096..63b0038b 100644 --- a/Makefile-libostree.am +++ b/Makefile-libostree.am @@ -261,6 +261,10 @@ OSTree-1.0.gir: libostree-1.la Makefile OSTree_1_0_gir_EXPORT_PACKAGES = ostree-1 OSTree_1_0_gir_INCLUDES = Gio-2.0 OSTree_1_0_gir_CFLAGS = $(libostree_1_la_CFLAGS) +if ENABLE_EXPERIMENTAL_API +# When compiling this is set via config.h, but g-ir-scanner can't use that +OSTree_1_0_gir_CFLAGS += -DOSTREE_ENABLE_EXPERIMENTAL_API=1 +endif OSTree_1_0_gir_LIBS = libostree-1.la OSTree_1_0_gir_SCANNERFLAGS = --warn-all --identifier-prefix=Ostree --symbol-prefix=ostree $(GI_SCANNERFLAGS) OSTree_1_0_gir_FILES = $(libostreeinclude_HEADERS) $(filter-out %-private.h %/ostree-soup-uri.h $(libostree_experimental_headers),$(libostree_1_la_SOURCES))