summaryrefslogtreecommitdiff
path: root/girepository
diff options
context:
space:
mode:
Diffstat (limited to 'girepository')
-rw-r--r--girepository/Makefile.am4
-rw-r--r--girepository/gdump.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/girepository/Makefile.am b/girepository/Makefile.am
index e0f2b1ba..16873220 100644
--- a/girepository/Makefile.am
+++ b/girepository/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/girepository/gdump.c b/girepository/gdump.c
index 84ac3c71..166a9e72 100644
--- a/girepository/gdump.c
+++ b/girepository/gdump.c
@@ -24,8 +24,15 @@
#include <glib-object.h>
#include <gio/gio.h>
-#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 <string.h>