[farsight2/master] Auto-generate rawudp marshallers list
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:25:51 PST 2008
---
transmitters/rawudp/Makefile.am | 16 +++++++++++++---
transmitters/rawudp/fs-rawudp-marshal.list | 3 ---
2 files changed, 13 insertions(+), 6 deletions(-)
delete mode 100644 transmitters/rawudp/fs-rawudp-marshal.list
diff --git a/transmitters/rawudp/Makefile.am b/transmitters/rawudp/Makefile.am
index a77472f..373feaf 100644
--- a/transmitters/rawudp/Makefile.am
+++ b/transmitters/rawudp/Makefile.am
@@ -25,8 +25,6 @@ librawudp_transmitter_la_LIBADD = \
$(GST_BASE_LIBS) \
$(GST_LIBS)
-EXTRA_librawudp_transmitter_la_SOURCES = fs-rawudp-marshal.list
-
noinst_HEADERS = \
fs-rawudp-transmitter.h \
fs-rawudp-stream-transmitter.h \
@@ -38,8 +36,20 @@ BUILT_SOURCES = \
fs-rawudp-marshal.c \
fs-rawudp-marshal.h
-CLEANFILES = $(BUILT_SOURCES)
+CLEANFILES = $(BUILT_SOURCES) fs-rawudp-marshal.list
+
+fs-rawudp-marshal.list: $(librawudp_transmitter_la_SOURCES) Makefile.am
+ ( cd $(srcdir) && \
+ sed -n -e 's/.*_fs_rawudp_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
+ $(librawudp_transmitter_la_SOURCES) ) \
+ | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
+ if cmp -s $@.tmp $@; then \
+ rm $@.tmp; \
+ touch $@; \
+ else \
+ mv $@.tmp $@; \
+ fi
fs-rawudp-marshal.h: fs-rawudp-marshal.list Makefile
glib-genmarshal --header --prefix=_fs_rawudp_marshal $(srcdir)/$< > $@.tmp
diff --git a/transmitters/rawudp/fs-rawudp-marshal.list b/transmitters/rawudp/fs-rawudp-marshal.list
deleted file mode 100644
index b824972..0000000
--- a/transmitters/rawudp/fs-rawudp-marshal.list
+++ /dev/null
@@ -1,3 +0,0 @@
-VOID:BOXED,BOXED
-VOID:ENUM,STRING,STRING
-VOID:UINT,POINTER
--
1.5.6.5
More information about the farsight-commits
mailing list