]> git.0d.be Git - empathy.git/blobdiff - libempathy/Makefile.am
Generate marshal.list thanks to gabble black magic.
[empathy.git] / libempathy / Makefile.am
index a114ad7c88154c8b2e7ec0ac1c5d3a814f8f6c50..5d0c021b26cd53cc8f073fc395f6f5e259f37fd1 100644 (file)
@@ -8,6 +8,7 @@ AM_CPPFLAGS =                                           \
 BUILT_SOURCES =                                        \
        empathy-marshal.h                               \
        empathy-marshal.c                               \
 BUILT_SOURCES =                                        \
        empathy-marshal.h                               \
        empathy-marshal.c                               \
+       empathy-marshal.list                            \
        empathy-enum-types.h                            \
        empathy-enum-types.c                            \
        empathy-filter-glue.h                           \
        empathy-enum-types.h                            \
        empathy-enum-types.c                            \
        empathy-filter-glue.h                           \
@@ -84,6 +85,17 @@ libempathy_include_HEADERS =                 \
        $(libempathy_headers)                   \
        empathy-enum-types.h
 
        $(libempathy_headers)                   \
        empathy-enum-types.h
 
+empathy-marshal.list: $(libempathy_la_SOURCES) Makefile.am
+       ( cd $(srcdir) && \
+       sed -n -e 's/.*empathy_marshal_\([[:upper:]]*__[[:upper:]_]*\).*/\1/p' \
+       $(libempathy_la_SOURCES) ) \
+       | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
+       if cmp -s $@.tmp $@; then \
+               rm $@.tmp; \
+       else \
+               mv $@.tmp $@; \
+       fi
+
 %-marshal.h: %-marshal.list Makefile
        $(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h
 
 %-marshal.h: %-marshal.list Makefile
        $(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h