[farsight2/master] Generate the signal marshaller .list files on the fly

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:25:37 PST 2008


Code taken from Gabble
---
 .gitignore                            |    1 +
 gst-libs/gst/farsight/Makefile.am     |   14 ++++++++++++--
 gst-libs/gst/farsight/fs-marshal.list |    6 ------
 3 files changed, 13 insertions(+), 8 deletions(-)
 delete mode 100644 gst-libs/gst/farsight/fs-marshal.list

diff --git a/.gitignore b/.gitignore
index c415820..3325ff3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,6 +17,7 @@ gst/fsrtpconference/gstfsrtpconference_doc.c
 transmitters/rawudp/fs-rawudp-marshal.[ch]
 
 gst-libs/gst/farsight/fs-marshal.[ch]
+gst-libs/gst/farsight/fs-marshal.list
 gst-libs/gst/farsight/fs-enum-types.[ch]
 
 docs/libs/farsight2-libs-decl-list.txt
diff --git a/gst-libs/gst/farsight/Makefile.am b/gst-libs/gst/farsight/Makefile.am
index 4cfebf5..28b012e 100644
--- a/gst-libs/gst/farsight/Makefile.am
+++ b/gst-libs/gst/farsight/Makefile.am
@@ -24,7 +24,7 @@ BUILT_SOURCES = \
 		fs-enum-types.c \
 		fs-enum-types.h
 
-CLEANFILES = $(BUILT_SOURCES)
+CLEANFILES = $(BUILT_SOURCES) fs-marshal.list
 
 libgstfarsight_ at GST_MAJORMINOR@_la_SOURCES = \
 		fs-base-conference.c \
@@ -46,7 +46,17 @@ noinst_HEADERS = \
 	fs-marshal.h \
 	fs-private.h
 
-EXTRA_libgstfarsight_ at GST_MAJORMINOR@_la_SOURCES = fs-marshal.list
+fs-marshal.list: $(libgstfarsight_ at GST_MAJORMINOR@_la_SOURCES) Makefile.am
+	( cd $(srcdir) && \
+	sed -n -e 's/.*_fs_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
+	$(libgstfarsight_ at GST_MAJORMINOR@_la_SOURCES) ) \
+	| sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
+	if cmp -s $@.tmp $@; then \
+		rm $@.tmp; \
+		touch $@; \
+	else \
+		mv $@.tmp $@; \
+	fi
 
 fs-marshal.h: Makefile fs-marshal.list
 		glib-genmarshal --header --prefix=_fs_marshal $(srcdir)/fs-marshal.list > fs-marshal.h.tmp
diff --git a/gst-libs/gst/farsight/fs-marshal.list b/gst-libs/gst/farsight/fs-marshal.list
deleted file mode 100644
index d265661..0000000
--- a/gst-libs/gst/farsight/fs-marshal.list
+++ /dev/null
@@ -1,6 +0,0 @@
-VOID:OBJECT,ENUM,STRING,STRING
-VOID:ENUM,STRING,STRING
-VOID:BOXED,BOXED
-VOID:OBJECT,OBJECT
-VOID:UINT,POINTER
-VOID:UINT,ENUM
-- 
1.5.6.5




More information about the farsight-commits mailing list