[glib] build: Ensure we #include header files for glib-genmarshal code



commit f6da43f56c8d884c477594a787d2d025f67b0784
Author: Colin Walters <walters verbum org>
Date:   Thu Nov 1 19:36:41 2012 -0400

    build: Ensure we #include header files for glib-genmarshal code
    
    Otherwise we fail with -Werror=missing-prototypes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687385

 gobject/tests/Makefile.am |    2 +-
 tests/gobject/Makefile.am |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gobject/tests/Makefile.am b/gobject/tests/Makefile.am
index 3100c2f..212cbda 100644
--- a/gobject/tests/Makefile.am
+++ b/gobject/tests/Makefile.am
@@ -34,7 +34,7 @@ marshalers.h: Makefile.am marshalers.list
 	$(AM_V_GEN) $(glib_genmarshal) --prefix=test $(srcdir)/marshalers.list --header --valist-marshallers > marshalers.h
 
 marshalers.c: Makefile.am marshalers.list
-	$(AM_V_GEN) $(glib_genmarshal) --prefix=test $(srcdir)/marshalers.list --body --valist-marshallers > marshalers.c
+	$(AM_V_GEN) (echo "#include \"marshalers.h\""; $(glib_genmarshal) --prefix=test $(srcdir)/marshalers.list --body --valist-marshallers) > $  tmp && mv $  tmp $@
 
 BUILT_SOURCES = marshalers.h marshalers.c
 CLEANFILES = marshalers.h marshalers.c
diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
index fcb4e23..63f2bcf 100644
--- a/tests/gobject/Makefile.am
+++ b/tests/gobject/Makefile.am
@@ -40,8 +40,8 @@ stamp-testmarshal.h: @REBUILD@ testmarshal.list $(glib_genmarshal)
 	&& (cmp -s xgen-gmh testmarshal.h 2>/dev/null || cp xgen-gmh testmarshal.h) \
 	&& rm -f xgen-gmh xgen-gmh~ \
 	&& echo timestamp > $@
-testmarshal.c: @REBUILD@ testmarshal.list $(glib_genmarshal)
-	$(AM_V_GEN) $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --body >> xgen-gmc \
+testmarshal.c: @REBUILD@ testmarshal.h testmarshal.list $(glib_genmarshal)
+	$(AM_V_GEN) (echo "#include \"testmarshal.h\""; $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --body) >> xgen-gmc \
 	&& cp xgen-gmc testmarshal.c \
 	&& rm -f xgen-gmc xgen-gmc~
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]