build: Don't include the marshallers header file

We used to inject the inclusion of the generated header file into the
generated body of the marshallers source code in order to avoid compiler
warnings about missing prototypes. The glib-genmarshal utility has been
fixed in GLib to include the prototype in the generated source, so now
we're going to trip -Werror=redundant-decls.
This commit is contained in:
Emmanuele Bassi 2017-04-28 21:50:41 +01:00
parent bb1deaafa4
commit 4724a89022
2 changed files with 18 additions and 7 deletions

View File

@ -417,12 +417,17 @@ gdkenumtypes.c: $(gdk_h_sources) gdkenumtypes.c.template
# Marshaller generation
#
gdkmarshalers.h: gdkmarshalers.list
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --header > gdkmarshalers-h.tmp \
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
--prefix=_gdk_marshal \
--header \
$(srcdir)/gdkmarshalers.list > gdkmarshalers-h.tmp \
&& mv gdkmarshalers-h.tmp gdkmarshalers.h \
|| ( rm -f gdkmarshalers-h.tmp && exit 1)
gdkmarshalers.c: gdkmarshalers.list
$(AM_V_GEN) (echo "#include \"gdkmarshalers.h\""; \
$(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --body) > gdkmarshalers-c.tmp \
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
--prefix=_gdk_marshal \
--body \
$(srcdir)/gdkmarshalers.list > gdkmarshalers-c.tmp \
&& mv gdkmarshalers-c.tmp gdkmarshalers.c \
|| ( rm -f gdkmarshalers-c.tmp && exit 1 )

View File

@ -1193,14 +1193,20 @@ BUILT_SOURCES = \
gtkmarshalers.h: stamp-gtkmarshalers.h
@true
stamp-gtkmarshalers.h: gtkmarshalers.list
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --header --valist-marshallers >> xgen-gmlh \
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
--prefix=_gtk_marshal \
--header \
--valist-marshallers \
$(srcdir)/gtkmarshalers.list >> xgen-gmlh \
&& (cmp -s xgen-gmlh gtkmarshalers.h || cp xgen-gmlh gtkmarshalers.h) \
&& rm -f xgen-gmlh \
&& echo timestamp > $(@F)
gtkmarshalers.c: gtkmarshalers.list
$(AM_V_GEN) (echo "#include \"gtkmarshalers.h\""; \
echo "#undef G_ENABLE_DEBUG"; \
$(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --body --valist-marshallers) >> xgen-gmlc \
$(AM_V_GEN) (echo "#undef G_ENABLE_DEBUG"; \
$(GLIB_GENMARSHAL) \
--prefix=_gtk_marshal \
--body \
--valist-marshallers $(srcdir)/gtkmarshalers.list) >> xgen-gmlc \
&& cp xgen-gmlc gtkmarshalers.c \
&& rm -f xgen-gmlc