diff options
-rw-r--r-- | libdbusmenu-glib/Makefile.am | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libdbusmenu-glib/Makefile.am b/libdbusmenu-glib/Makefile.am index faf0634..be70cfa 100644 --- a/libdbusmenu-glib/Makefile.am +++ b/libdbusmenu-glib/Makefile.am @@ -20,6 +20,8 @@ libdbusmenu_glibinclude_HEADERS = \ client.h libdbusmenu_glib_la_SOURCES = \ + dbus-menu.xml.h \ + dbus-menu.xml.c \ menuitem.h \ menuitem.c \ menuitem-marshal.h \ @@ -52,7 +54,18 @@ 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 ";" >> $@ + + BUILT_SOURCES = \ + dbus-menu.xml.c \ + dbus-menu.xml.h \ client-marshal.h \ client-marshal.c \ menuitem-marshal.h \ @@ -60,6 +73,8 @@ BUILT_SOURCES = \ server-marshal.h \ server-marshal.c +CLEANFILES += $(BUILT_SOURCES) + client-marshal.h: $(srcdir)/client-marshal.list glib-genmarshal --header \ --prefix=_dbusmenu_client_marshal $(srcdir)/client-marshal.list \ |