aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am.marshal
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-16 15:36:22 -0500
committerTed Gould <ted@canonical.com>2009-10-16 15:36:22 -0500
commit227666e9b4a1d928875513acfa8f019497a4261f (patch)
tree3aee3d9693a6f612e019acb27936ee0b985e874c /Makefile.am.marshal
parent664bc74b6f0b3eb6ca30539628e2350ed3a2e20c (diff)
parent50e28fd237a7de7e3f28332711dc01c7fe8e4dbd (diff)
downloadlibayatana-appindicator-227666e9b4a1d928875513acfa8f019497a4261f.tar.gz
libayatana-appindicator-227666e9b4a1d928875513acfa8f019497a4261f.tar.bz2
libayatana-appindicator-227666e9b4a1d928875513acfa8f019497a4261f.zip
Merging in the library interface.
Diffstat (limited to 'Makefile.am.marshal')
-rw-r--r--Makefile.am.marshal45
1 files changed, 45 insertions, 0 deletions
diff --git a/Makefile.am.marshal b/Makefile.am.marshal
new file mode 100644
index 0000000..8b30d4f
--- /dev/null
+++ b/Makefile.am.marshal
@@ -0,0 +1,45 @@
+# Rules for generating marshal files using glib-genmarshal
+#
+# Define:
+# glib_marshal_list = marshal list file
+# glib_marshal_prefix = prefix for marshal functions
+#
+# before including Makefile.am.marshal. You will also need to have
+# the following targets already defined:
+#
+# CLEANFILES
+# DISTCLEANFILES
+# BUILT_SOURCES
+# EXTRA_DIST
+#
+# Author: Emmanuele Bassi <ebassi@linux.intel.com>
+
+marshal_h = $(glib_marshal_list:.list=.h)
+marshal_c = $(glib_marshal_list:.list=.c)
+
+CLEANFILES += stamp-marshal
+DISTCLEANFILES += $(marshal_h) $(marshal_c)
+BUILT_SOURCES += $(marshal_h) $(marshal_c)
+EXTRA_DIST += $(glib_marshal_list)
+
+stamp-marshal: $(glib_marshal_list)
+ $(QUIET_GEN)$(GLIB_GENMARSHAL) \
+ --prefix=$(glib_marshal_prefix) \
+ --header \
+ $(glib_marshal_list) > xgen-mh \
+ && (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \
+ && rm -f xgen-mh \
+ && echo timestamp > $(@F)
+
+$(marshal_h): stamp-marshal
+ @true
+
+$(marshal_c): $(marshal_h)
+ $(QUIET_GEN)(echo "#include \"$(marshal_h)\"" ; \
+ $(GLIB_GENMARSHAL) \
+ --prefix=$(glib_marshal_prefix) \
+ --body \
+ $(glib_marshal_list)) > xgen-mc \
+ && cp xgen-mc $(marshal_c) \
+ && rm -f xgen-mc
+