~ted/appmenu-gtk/dbusmenu-0.4

« back to all changes in this revision

Viewing changes to src/Makefile.am

  • Committer: Ted Gould
  • Date: 2011-01-04 22:54:15 UTC
  • Revision ID: ted@gould.cx-20110104225415-noi2pepfr3cmglik
Change to building the mock C file for the interface.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
CLEANFILES =
2
2
DISTCLEANFILES =
3
3
BUILT_SOURCES =
 
4
EXTRA_DIST=
4
5
 
5
6
moduledir = $(libdir)/gtk-2.0/2.10.0/menuproxies
6
7
module_LTLIBRARIES = libappmenu.la
7
8
 
8
 
sources_h =                     \
9
 
        bridge.h
10
 
 
11
 
EXTRA_DIST = application-menu-registrar.xml     \
12
 
        $(sources_h)
13
 
 
14
9
libappmenu_la_SOURCES =         \
15
 
        bridge.c
 
10
        bridge.c \
 
11
        bridge.h \
 
12
        gen-application-menu-registrar.xml.c \
 
13
        gen-application-menu-registrar.xml.h
16
14
 
17
15
libappmenu_la_CPPFLAGS =        \
18
16
        -Wall -Werror           \
39
37
        $(GCC_FLAGS)                    \
40
38
        $(MAINTAINER_CFLAGS)
41
39
 
42
 
%-client.h: %.xml
43
 
        dbus-binding-tool                                               \
44
 
                --prefix=_$(notdir $(subst -,_,$(<:.xml=)))_client      \
45
 
                --mode=glib-client                                      \
46
 
                --output=$@                                             \
47
 
                $<
48
 
 
49
 
%-server.h: %.xml
50
 
        dbus-binding-tool                                               \
51
 
                --prefix=_$(notdir $(subst -,_,$(<:.xml=)))_server      \
52
 
                --mode=glib-server                                      \
53
 
                --output=$@                                             \
54
 
                $<
55
 
 
56
 
BUILT_SOURCES +=                                                        \
57
 
        $(DBUS_SPECS:.xml=-client.h)                                    \
58
 
        $(DBUS_SPECS:.xml=-server.h)
 
40
gen-%.xml.h: %.xml
 
41
        @echo "Building $@ from $<"
 
42
        @echo "extern const char * _$(subst -,_,$(subst .,_,$(basename $<)));" > $@
 
43
 
 
44
gen-%.xml.c: %.xml
 
45
        @echo "Building $@ from $<"
 
46
        @echo "const char * _$(subst -,_,$(subst .,_,$(basename $<))) = " > $@
 
47
        @sed -e "s:\":\\\\\":g" -e s:^:\": -e s:\$$:\\\\n\": $< >> $@
 
48
        @echo ";" >> $@
 
49
 
 
50
BUILT_SOURCES += \
 
51
        gen-application-menu-registrar.xml.h \
 
52
        gen-application-menu-registrar.xml.c
59
53
 
60
54
CLEANFILES += $(BUILT_SOURCES)
61
55