From: Xavier Claessens Date: Sat, 9 Feb 2008 21:07:02 +0000 (+0000) Subject: Generate marshal.list thanks to gabble black magic. X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=f82a1cfd7d318c35cf9fb696d38d63c9d5a899d2 Generate marshal.list thanks to gabble black magic. svn path=/trunk/; revision=614 --- diff --git a/libempathy-gtk/.gitignore b/libempathy-gtk/.gitignore index a3a15a1a..3e3f6f05 100644 --- a/libempathy-gtk/.gitignore +++ b/libempathy-gtk/.gitignore @@ -1 +1,2 @@ +empathy-gtk-marshal.* *.gladep diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am index 987e28f2..6d5eeab7 100644 --- a/libempathy-gtk/Makefile.am +++ b/libempathy-gtk/Makefile.am @@ -6,6 +6,9 @@ AM_CPPFLAGS = \ $(WARN_CFLAGS) BUILT_SOURCES = \ + empathy-gtk-marshal.h \ + empathy-gtk-marshal.c \ + empathy-gtk-marshal.list \ empathy-gtk-enum-types.h \ empathy-gtk-enum-types.c @@ -137,6 +140,24 @@ glade_DATA = \ empathy-chat.glade \ empathy-new-message-dialog.glade +empathy-gtk-marshal.list: $(libempathy_gtk_la_SOURCES) Makefile.am + ( cd $(srcdir) && \ + sed -n -e 's/.*empathy_gtk_marshal_\([[:upper:]]*__[[:upper:]_]*\).*/\1/p' \ + $(libempathy_gtk_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.c: %-marshal.list Makefile + echo "#include \"empathy-gtk-marshal.h\"" > $@ && \ + $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c + empathy-gtk-enum-types.h: stamp-empathy-gtk-enum-types.h @true stamp-empathy-gtk-enum-types.h: Makefile $(libempathy_gtk_headers) diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 2594ac20..f7c01382 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -40,7 +40,6 @@ #include #include #include -#include #include "empathy-chat.h" #include "empathy-chat-window.h" @@ -50,6 +49,7 @@ #include "empathy-spell.h" #include "empathy-spell-dialog.h" #include "empathy-ui-utils.h" +#include "empathy-gtk-marshal.h" #define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CHAT, EmpathyChatPriv)) @@ -279,7 +279,7 @@ empathy_chat_class_init (EmpathyChatClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - _empathy_marshal_VOID__OBJECT_BOOLEAN, + _empathy_gtk_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, EMPATHY_TYPE_MESSAGE, G_TYPE_BOOLEAN); diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index 7dbc9dd8..ad819139 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -43,7 +43,6 @@ #include #include #include -#include #include "empathy-contact-list-view.h" #include "empathy-contact-list-store.h" @@ -57,6 +56,7 @@ //#include "empathy-ft-window.h" #include "empathy-log-window.h" #include "empathy-gtk-enum-types.h" +#include "empathy-gtk-marshal.h" #define DEBUG_DOMAIN "ContactListView" @@ -322,7 +322,7 @@ empathy_contact_list_view_class_init (EmpathyContactListViewClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - _empathy_marshal_VOID__OBJECT_STRING_STRING, + _empathy_gtk_marshal_VOID__OBJECT_STRING_STRING, G_TYPE_NONE, 3, EMPATHY_TYPE_CONTACT, G_TYPE_STRING, G_TYPE_STRING); diff --git a/libempathy/Makefile.am b/libempathy/Makefile.am index a114ad7c..5d0c021b 100644 --- a/libempathy/Makefile.am +++ b/libempathy/Makefile.am @@ -8,6 +8,7 @@ AM_CPPFLAGS = \ BUILT_SOURCES = \ empathy-marshal.h \ empathy-marshal.c \ + empathy-marshal.list \ 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 +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 diff --git a/libempathy/empathy-marshal.list b/libempathy/empathy-marshal.list deleted file mode 100644 index 1a79b058..00000000 --- a/libempathy/empathy-marshal.list +++ /dev/null @@ -1,15 +0,0 @@ -VOID:VOID -VOID:OBJECT,UINT -VOID:OBJECT,BOOLEAN -VOID:OBJECT,POINTER -VOID:OBJECT,STRING -VOID:OBJECT,STRING,STRING -VOID:OBJECT,STRING,BOOLEAN -VOID:OBJECT,OBJECT -VOID:OBJECT,OBJECT,UINT -VOID:OBJECT,OBJECT,UINT,STRING -VOID:OBJECT,OBJECT,UINT,STRING,BOOLEAN -VOID:OBJECT,OBJECT,STRING -VOID:INT,STRING -VOID:UINT,BOOLEAN -