aboutsummaryrefslogtreecommitdiff
path: root/bindings/vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-02-10 22:18:21 -0600
committerTed Gould <ted@gould.cx>2011-02-10 22:18:21 -0600
commit4044f927a2764ea2414eb423ce054989ecf0386e (patch)
tree92b11e331d6e21f27f7c7db37a2d177902ca02e6 /bindings/vala
parente5b56ecf9a05381c8ba725f53f064c2c8569ea8f (diff)
parent4d24048fffc19e52adb9c0fc4e4a35f3c96faae7 (diff)
downloadlibayatana-appindicator-4044f927a2764ea2414eb423ce054989ecf0386e.tar.gz
libayatana-appindicator-4044f927a2764ea2414eb423ce054989ecf0386e.tar.bz2
libayatana-appindicator-4044f927a2764ea2414eb423ce054989ecf0386e.zip
Fix the build so we can distcheck with GTK 2 and 3
Diffstat (limited to 'bindings/vala')
-rw-r--r--bindings/vala/examples/Makefile.am36
1 files changed, 31 insertions, 5 deletions
diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am
index 32a695b..484a00a 100644
--- a/bindings/vala/examples/Makefile.am
+++ b/bindings/vala/examples/Makefile.am
@@ -1,13 +1,39 @@
+if USE_GTK3
+VER=3
+else
+VER=
+endif
VALAFILES = indicator-example.vala
-CLEANFILES = $(TESTS) *.c
EXTRA_DIST = $(VALAFILES)
-VALAFLAGS = --pkg appindicator-0.1 --vapidir=$(top_builddir)/bindings/vala --save-temps
+VALAFLAGS = \
+ --pkg appindicator$(VER)-0.1 \
+ --vapidir=$(top_builddir)/bindings/vala \
+ --save-temps
if HAVE_VALAC
-indicator-example: $(VALAFILES) Makefile.am
- $(VALAC) $(VALAFLAGS) $(srcdir)/$(VALAFILES)
-check: indicator-example
+BUILT_SOURCES = indicator-example.c
+
+indicator-example.c: $(VALAFILES) Makefile.am
+ $(VALAC) $(VALAFLAGS) -C $< -o $@
+ $(SED) -i "s|#include\s*<\s*libappindicator/app-indicator.h\s*>||g" $@
+
+nodist_indicator_example_SOURCES = indicator-example.c
+indicator_example_CFLAGS = \
+ $(LIBRARY_CFLAGS) \
+ -Wall -Werror \
+ -I$(top_srcdir)/src \
+ -include $(top_srcdir)/src/app-indicator.h
+indicator_example_LDADD = \
+ $(LIBRARY_LIBS) \
+ $(top_builddir)/src/libappindicator$(VER).la
+
+check_PROGRAMS = indicator-example
+
+CLEANFILES = \
+ *.c \
+ indicator-example
+
endif