Generate marshal.list thanks to gabble black magic.
authorXavier Claessens <xclaesse@src.gnome.org>
Sat, 9 Feb 2008 21:07:02 +0000 (21:07 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sat, 9 Feb 2008 21:07:02 +0000 (21:07 +0000)
svn path=/trunk/; revision=614

libempathy-gtk/.gitignore
libempathy-gtk/Makefile.am
libempathy-gtk/empathy-chat.c
libempathy-gtk/empathy-contact-list-view.c
libempathy/Makefile.am
libempathy/empathy-marshal.list [deleted file]

index a3a15a1a4f82825cb519125931dc3925645bc8f2..3e3f6f051a280187461d70be1da0c4c64ccaad31 100644 (file)
@@ -1 +1,2 @@
+empathy-gtk-marshal.*
 *.gladep
index 987e28f2e8d4d5f3f581f442e90ec7f53f4dcd42..6d5eeab7dd66af2f4dd38f1785a7607850f69850 100644 (file)
@@ -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)
index 2594ac201699978c0b16dc2dcb1b7dd74afe1b97..f7c013820c18b6e43a26493a9bef532101d2ad0b 100644 (file)
@@ -40,7 +40,6 @@
 #include <libempathy/empathy-log-manager.h>
 #include <libempathy/empathy-debug.h>
 #include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-marshal.h>
 
 #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);
 
index 7dbc9dd871f7f70b5fa691d80ea05ae04afc30d8..ad8191398fd37e40f9e457c962742a6c4c9c9527 100644 (file)
@@ -43,7 +43,6 @@
 #include <libempathy/empathy-contact-groups.h>
 #include <libempathy/empathy-debug.h>
 #include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-marshal.h>
 
 #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);
 
index a114ad7c88154c8b2e7ec0ac1c5d3a814f8f6c50..5d0c021b26cd53cc8f073fc395f6f5e259f37fd1 100644 (file)
@@ -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 (file)
index 1a79b05..0000000
+++ /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
-