diff options
author | Ted Gould <ted@gould.cx> | 2010-10-13 16:54:03 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-10-13 16:54:03 -0500 |
commit | 096f22a1b8fb8052e78ede98257556cef332da7a (patch) | |
tree | e2fd4c85bb53ef68f84d07c27c75c5d75eeadbd2 | |
parent | 43ed1f7c65381c84da61998066ef45c89e0ed035 (diff) | |
download | libdbusmenu-096f22a1b8fb8052e78ede98257556cef332da7a.tar.gz libdbusmenu-096f22a1b8fb8052e78ede98257556cef332da7a.tar.bz2 libdbusmenu-096f22a1b8fb8052e78ede98257556cef332da7a.zip |
Make the XML into something we can include in the source
-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 \ |