[gtk+] Use newer glib-genmarshal to simplify build rules
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Use newer glib-genmarshal to simplify build rules
- Date: Tue, 11 Jul 2017 10:47:53 +0000 (UTC)
commit ce861bc43050c657c3baf7b655dc76fe554e46b0
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Jul 11 11:39:59 2017 +0100
Use newer glib-genmarshal to simplify build rules
The glib-genmarshal tool from GLib 2.54 added various command line
arguments that allow us to remove a bunch of as hoc manipulations of
the generated marshaller source files. The marshal generator tool can
now include an header in the source, and undef the G_ENABLE_DEBUG
pre-processor symbol for us. It can also generate the prototypes of the
marshallers in the C source, and avoid a 'missing-prototypes' compiler
warning.
gdk/Makefile.am | 1 +
gtk/Makefile.am | 14 ++++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 6fbd478..d830cef 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -426,6 +426,7 @@ gdkmarshalers.c: gdkmarshalers.list
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
--prefix=_gdk_marshal \
--body \
+ --prototypes \
$(srcdir)/gdkmarshalers.list > gdkmarshalers-c.tmp \
&& mv gdkmarshalers-c.tmp gdkmarshalers.c \
|| ( rm -f gdkmarshalers-c.tmp && exit 1 )
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index d204ba2..826eeb4 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -1196,19 +1196,21 @@ gtkmarshalers.h: stamp-gtkmarshalers.h
@true
stamp-gtkmarshalers.h: gtkmarshalers.list
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
- --prefix=_gtk_marshal \
--header \
+ --prefix=_gtk_marshal \
--valist-marshallers \
- $(srcdir)/gtkmarshalers.list >> xgen-gmlh \
+ $(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 "#undef G_ENABLE_DEBUG"; \
- $(GLIB_GENMARSHAL) \
- --prefix=_gtk_marshal \
+ $(AM_V_GEN) $(GLIB_GENMARSHAL) \
--body \
- --valist-marshallers $(srcdir)/gtkmarshalers.list) >> xgen-gmlc \
+ --prefix=_gtk_marshal \
+ --valist-marshallers \
+ --include-header="gtkmarshalers.h" \
+ -U G_ENABLE_DEBUG \
+ $(srcdir)/gtkmarshalers.list > xgen-gmlc \
&& cp xgen-gmlc gtkmarshalers.c \
&& rm -f xgen-gmlc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]