[empathy/gnome-2-34] Generate closures for src/



commit 42a6c594b066bb28ee7ccfe66837562caf72254d
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Wed Feb 9 16:12:32 2011 +0000

    Generate closures for src/

 src/Makefile.am |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index e321b83..e175580 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -90,7 +90,10 @@ libexec_PROGRAMS = \
 	empathy-av \
 	empathy-auth-client
 
-BUILT_SOURCES=
+BUILT_SOURCES = \
+	src-marshal.h \
+	src-marshal.c \
+	src-marshal.list
 
 empathy_accounts_SOURCES =						\
 	empathy-accounts.c empathy-accounts.h				\
@@ -199,6 +202,24 @@ dist_man_MANS =			\
 	empathy.1 \
 	empathy-accounts.1
 
+src-marshal.list: $(empathy_SOURCES) Makefile.am
+	$(AM_V_GEN)( cd $(srcdir) && \
+	sed -n -e 's/.*src_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
+	$(wildcard *.c) ) \
+	| sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $  tmp
+	@if cmp -s $  tmp $@; then \
+		rm $  tmp; \
+	else \
+		mv $  tmp $@; \
+	fi
+
+%-marshal.h: %-marshal.list Makefile
+	$(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
+
+%-marshal.c: %-marshal.list Makefile
+	$(AM_V_GEN)echo "#include \"src-marshal.h\"" > $@ && \
+	$(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c
+
 # rules for making the glib enum objects
 %-enumtypes.h: %.h Makefile.in
 	$(AM_V_GEN)glib-mkenums \



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