From 7f49d7c2602ccb2ef01c64067e2abcc6b5715200 Mon Sep 17 00:00:00 2001 From: "Marco Trevisan (TreviƱo)" Date: Thu, 3 Feb 2011 16:22:06 +0100 Subject: Adding vala bindings and example Adding proper support for vala bindings, fixing the include path Now they are built in the bindings subfolder and they include a *.deps file. and I've also added a small example. --- bindings/vala/examples/Makefile.am | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 bindings/vala/examples/Makefile.am (limited to 'bindings/vala/examples/Makefile.am') diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am new file mode 100644 index 0000000..6c3bd3c --- /dev/null +++ b/bindings/vala/examples/Makefile.am @@ -0,0 +1,14 @@ + +TESTS = indicator-example +VALAFILES = indicator-example.vala +CLEANFILES = $(TESTS) *.c +EXTRA_DIST = $(VALAFILES) + +VALAFLAGS = --pkg appindicator-0.1 --vapidir=$(top_builddir)/bindings/vala --save-temps + +if HAVE_VALAC +$(TESTS): $(VALAFILES) Makefile.am + $(VALAC) $(VALAFLAGS) $(srcdir)/$(VALAFILES) + +all: $(TESTS) +endif -- cgit v1.2.3 From 692281a6d91151306cc8cac72c22d451c17438a1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 3 Feb 2011 12:37:57 -0600 Subject: Changing the build to be the check instead of running it as we might not be interactive. --- bindings/vala/examples/Makefile.am | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bindings/vala/examples/Makefile.am') diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am index 6c3bd3c..32a695b 100644 --- a/bindings/vala/examples/Makefile.am +++ b/bindings/vala/examples/Makefile.am @@ -1,5 +1,4 @@ -TESTS = indicator-example VALAFILES = indicator-example.vala CLEANFILES = $(TESTS) *.c EXTRA_DIST = $(VALAFILES) @@ -7,8 +6,8 @@ EXTRA_DIST = $(VALAFILES) VALAFLAGS = --pkg appindicator-0.1 --vapidir=$(top_builddir)/bindings/vala --save-temps if HAVE_VALAC -$(TESTS): $(VALAFILES) Makefile.am +indicator-example: $(VALAFILES) Makefile.am $(VALAC) $(VALAFLAGS) $(srcdir)/$(VALAFILES) -all: $(TESTS) +check: indicator-example endif -- cgit v1.2.3 From b1842091e350f0483561435bc49afbbba99f9468 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 21:11:14 -0600 Subject: Cleanup what we create --- bindings/vala/examples/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bindings/vala/examples/Makefile.am') diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am index 32a695b..f5f2c56 100644 --- a/bindings/vala/examples/Makefile.am +++ b/bindings/vala/examples/Makefile.am @@ -1,6 +1,5 @@ VALAFILES = indicator-example.vala -CLEANFILES = $(TESTS) *.c EXTRA_DIST = $(VALAFILES) VALAFLAGS = --pkg appindicator-0.1 --vapidir=$(top_builddir)/bindings/vala --save-temps @@ -10,4 +9,9 @@ indicator-example: $(VALAFILES) Makefile.am $(VALAC) $(VALAFLAGS) $(srcdir)/$(VALAFILES) check: indicator-example + +CLEANFILES = \ + *.c \ + indicator-example + endif -- cgit v1.2.3 From 889b2da654b149bca523f7f57492de190ae8d865 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 10 Feb 2011 22:05:20 -0600 Subject: Changing the build so that it uses the right version of the vala files and removes the predefined header location --- bindings/vala/examples/Makefile.am | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'bindings/vala/examples/Makefile.am') diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am index f5f2c56..484a00a 100644 --- a/bindings/vala/examples/Makefile.am +++ b/bindings/vala/examples/Makefile.am @@ -1,14 +1,36 @@ +if USE_GTK3 +VER=3 +else +VER= +endif VALAFILES = indicator-example.vala 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 \ -- cgit v1.2.3