diff --git a/Makefile.am b/Makefile.am index e0f2b1bab..168732208 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,7 +53,7 @@ libgirepository_1_0_la_SOURCES = \ giunioninfo.c \ givfuncinfo.c -libgirepository_1_0_la_CPPFLAGS = $(GIREPO_CFLAGS) +libgirepository_1_0_la_CPPFLAGS = $(GIREPO_CFLAGS) -DG_IREPOSITORY_COMPILATION libgirepository_1_0_la_LIBADD = $(GIREPO_LIBS) libgirepository_1_0_la_LDFLAGS = -no-undefined -version-number 1:0:0 @@ -69,3 +69,5 @@ libgirepository_parser_la_SOURCES = \ girwriter.h libgirepository_parser_la_CFLAGS = $(GIREPO_CFLAGS) +gdumpdir = $(datadir)/gobject-introspection-1.0/ +gdump_DATA = gdump.c diff --git a/gdump.c b/gdump.c index 84ac3c718..166a9e72a 100644 --- a/gdump.c +++ b/gdump.c @@ -24,8 +24,15 @@ #include #include -#include "girepository.h" +/* This file is both compiled into libgirepository.so, and installed + * on the filesystem. But for the dumper, we want to avoid linking + * to libgirepository; see + * https://bugzilla.gnome.org/show_bug.cgi?id=630342 + */ +#ifdef G_IREPOSITORY_COMPILATION #include "config.h" +#include "girepository.h" +#endif #include