aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-01-14 12:33:06 -0600
committerTed Gould <ted@gould.cx>2011-01-14 12:33:06 -0600
commit05083ac8dd47fdf45fc0823b9410ac5a58724578 (patch)
tree4e4ee1f3d4b1608f17ac0d27726fe52946f5b13b /src/Makefile.am
parent22481b092787e357f3c70b086e36c9028359d3ad (diff)
downloadayatana-indicator-messages-05083ac8dd47fdf45fc0823b9410ac5a58724578.tar.gz
ayatana-indicator-messages-05083ac8dd47fdf45fc0823b9410ac5a58724578.tar.bz2
ayatana-indicator-messages-05083ac8dd47fdf45fc0823b9410ac5a58724578.zip
Switching over from using dbus-binding-tool to sed
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 7c9842a..dd09b8a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,7 +9,8 @@ messaginglibdir = $(INDICATORDIR)
messaginglib_LTLIBRARIES = libmessaging.la
libmessaging_la_SOURCES = \
indicator-messages.c \
- messages-service-client.h \
+ gen-messages-service.xml.h \
+ gen-messages-service.xml.c \
dbus-data.h
libmessaging_la_CFLAGS = $(APPLET_CFLAGS) -Wall -Wl,-Bsymbolic-functions -Wl,-z,defs -Wl,--as-needed -Werror
libmessaging_la_LIBADD = $(APPLET_LIBS)
@@ -23,9 +24,10 @@ indicator_messages_service_SOURCES = \
default-applications.h \
default-applications.c \
messages-service.c \
- messages-service-server.h \
messages-service-dbus.c \
messages-service-dbus.h \
+ gen-messages-service.xml.h \
+ gen-messages-service.xml.c \
im-menu-item.c \
im-menu-item.h \
app-menu-item.c \
@@ -39,23 +41,19 @@ indicator_messages_service_SOURCES = \
indicator_messages_service_CFLAGS = $(APPLET_CFLAGS) -Wall -Wl,-Bsymbolic-functions -Wl,-z,defs -Wl,--as-needed -Werror
indicator_messages_service_LDADD = $(APPLET_LIBS)
-messages-service-client.h: $(srcdir)/messages-service.xml
- dbus-binding-tool \
- --prefix=_messages_service_client \
- --mode=glib-client \
- --output=messages-service-client.h \
- $(srcdir)/messages-service.xml
+gen-%.xml.h: %.xml
+ @echo "Building $@ from $<"
+ @echo "extern const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<))));" > $@
-messages-service-server.h: $(srcdir)/messages-service.xml
- dbus-binding-tool \
- --prefix=_messages_service_server \
- --mode=glib-server \
- --output=messages-service-server.h \
- $(srcdir)/messages-service.xml
+gen-%.xml.c: %.xml
+ @echo "Building $@ from $<"
+ echo "const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<)))) = " > $@
+ @sed -e "s:\":\\\\\":g" -e s:^:\": -e s:\$$:\\\\n\": $< >> $@
+ @echo ";" >> $@
BUILT_SOURCES = \
- messages-service-client.h \
- messages-service-server.h
+ gen-messages-service.xml.h \
+ gen-messages-service.xml.c
CLEANFILES = \
$(BUILT_SOURCES)