GNOME Bugzilla – Bug 594199
GObject-Introspection files fail to build for out-of-tree builds
Last modified: 2009-12-18 09:22:51 UTC
Hi, currently the gobject-introspection files fail to build for out-of-tree builds. This is becase g-ir-scanner gets the source files passed without a path. To fix this all source files should get $(srcdir) prepended.
I also saw this problem. And selectively prepending $(srcdir) to relevant sources is not trivial, as the list is mixed with built sources like pango-enum-types.c, which is under $(builddir). Relying on $^ auto variable is not straightforward, either, as the *.gir targets depend on various kinds of sources, some of which must be supplied via command-line option, such as libpango-1.0.la. So, I ended up with GNU make auto-only prerequisites, like this: ---8<--- Pango-1.0.gir: $(libpango_1_0_la_SOURCES) Pango-1.0.gir: $(pango_headers) Pango-1.0.gir: | libpango-1.0.la Pango-1.0.gir: | $(G_IR_SCANNER) Makefile $(AM_V_GEN) $(G_IR_SCANNER) -v --namespace Pango --nsversion=1.0 \ --add-include-path=$(srcdir) --add-include-path=. \ ... $(PANGO_CFLAGS) \ $^ \ pango-enum-types.h ---8<---
Created attachment 143230 [details] [review] Summarized patch according to comment #1
(In reply to comment #1) > So, I ended up with GNU make auto-only prerequisites, like this: s/auto/order/
*** This bug has been marked as a duplicate of bug 604770 ***