aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'libdbusmenu-glib/Makefile.am')
-rw-r--r--libdbusmenu-glib/Makefile.am60
1 files changed, 31 insertions, 29 deletions
diff --git a/libdbusmenu-glib/Makefile.am b/libdbusmenu-glib/Makefile.am
index 0a6513f..6db7e5d 100644
--- a/libdbusmenu-glib/Makefile.am
+++ b/libdbusmenu-glib/Makefile.am
@@ -2,6 +2,7 @@
CLEANFILES =
EXTRA_DIST = \
+ clean-namespaces.xslt \
dbusmenu-glib.pc.in \
dbus-menu.xml \
client-marshal.list \
@@ -11,7 +12,7 @@ EXTRA_DIST = \
lib_LTLIBRARIES = \
libdbusmenu-glib.la
-libdbusmenu_glibincludedir=$(includedir)/libdbusmenu-0.1/libdbusmenu-glib/
+libdbusmenu_glibincludedir=$(includedir)/libdbusmenu-0.4/libdbusmenu-glib/
libdbusmenu_glibinclude_HEADERS = \
menuitem.h \
@@ -20,8 +21,8 @@ libdbusmenu_glibinclude_HEADERS = \
client.h
libdbusmenu_glib_la_SOURCES = \
- dbusmenu-server.h \
- dbusmenu-client.h \
+ dbus-menu-clean.xml.h \
+ dbus-menu-clean.xml.c \
menuitem.h \
menuitem.c \
menuitem-marshal.h \
@@ -54,9 +55,22 @@ libdbusmenu_glib_la_LIBADD = \
pkgconfig_DATA = dbusmenu-glib.pc
pkgconfigdir = $(libdir)/pkgconfig
+%.xml.h: %.xml
+ echo "extern const char * $(subst -,_,$(subst .,_,$(basename $@)));" > $@
+
+%.xml.c: %.xml
+ echo "const char * $(subst -,_,$(subst .,_,$(basename $@))) = " > $@
+ sed -e "s:\":\\\\\":g" -e s:^:\": -e s:\$$:\\\\n\": $< >> $@
+ echo ";" >> $@
+
+dbus-menu-clean.xml: dbus-menu.xml
+ xsltproc $(srcdir)/clean-namespaces.xslt $< > $@ || (rm -f $@ && /bin/false)
+
+CLEANFILES += dbus-menu-clean.xml
+
BUILT_SOURCES = \
- dbusmenu-client.h \
- dbusmenu-server.h \
+ dbus-menu-clean.xml.c \
+ dbus-menu-clean.xml.h \
client-marshal.h \
client-marshal.c \
menuitem-marshal.h \
@@ -64,19 +78,7 @@ BUILT_SOURCES = \
server-marshal.h \
server-marshal.c
-dbusmenu-server.h: dbus-menu.xml
- dbus-binding-tool \
- --prefix=_dbusmenu_server \
- --mode=glib-server \
- --output=dbusmenu-server.h \
- $(srcdir)/dbus-menu.xml
-
-dbusmenu-client.h: dbus-menu.xml
- dbus-binding-tool \
- --prefix=_dbusmenu_client \
- --mode=glib-client \
- --output=dbusmenu-client.h \
- $(srcdir)/dbus-menu.xml
+CLEANFILES += $(BUILT_SOURCES)
client-marshal.h: $(srcdir)/client-marshal.list
glib-genmarshal --header \
@@ -123,16 +125,16 @@ if HAVE_INTROSPECTION
introspection_sources = $(libdbusmenu_glibinclude_HEADERS)
-Dbusmenu_Glib-0.2.gir: libdbusmenu-glib.la
-Dbusmenu_Glib_0_2_gir_INCLUDES = \
+Dbusmenu_Glib-0.4.gir: libdbusmenu-glib.la
+Dbusmenu_Glib_0_4_gir_INCLUDES = \
GObject-2.0
-Dbusmenu_Glib_0_2_gir_CFLAGS = $(DBUSMENUGLIB_CFLAGS)
-Dbusmenu_Glib_0_2_gir_LIBS = libdbusmenu-glib.la
-Dbusmenu_Glib_0_2_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources))
-Dbusmenu_Glib_0_2_gir_NAMESPACE = Dbusmenu
-Dbusmenu_Glib_0_2_gir_VERSION = Glib-0.2
+Dbusmenu_Glib_0_4_gir_CFLAGS = $(DBUSMENUGLIB_CFLAGS)
+Dbusmenu_Glib_0_4_gir_LIBS = libdbusmenu-glib.la
+Dbusmenu_Glib_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources))
+Dbusmenu_Glib_0_4_gir_NAMESPACE = Dbusmenu
+Dbusmenu_Glib_0_4_gir_VERSION = Glib-0.2
-INTROSPECTION_GIRS += Dbusmenu-Glib-0.2.gir
+INTROSPECTION_GIRS += Dbusmenu-Glib-0.4.gir
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
@@ -151,10 +153,10 @@ endif
if HAVE_INTROSPECTION
vapidir = $(datadir)/vala/vapi
-vapi_DATA = Dbusmenu-Glib-0.2.vapi
+vapi_DATA = Dbusmenu-Glib-0.4.vapi
-Dbusmenu-Glib-0.2.vapi: Dbusmenu-Glib-0.2.gir
- $(VALA_API_GEN) --library=Dbusmenu-Glib-0.2 $<
+Dbusmenu-Glib-0.4.vapi: Dbusmenu-Glib-0.4.gir
+ $(VALA_API_GEN) --library=Dbusmenu-Glib-0.4 $<
CLEANFILES += $(vapi_DATA)