From 7f49d7c2602ccb2ef01c64067e2abcc6b5715200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= 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/Makefile.am | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 bindings/vala/Makefile.am (limited to 'bindings/vala/Makefile.am') diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am new file mode 100644 index 0000000..c4627f5 --- /dev/null +++ b/bindings/vala/Makefile.am @@ -0,0 +1,32 @@ +SUBDIRS = . examples + + +######################### +# VAPI Files +######################### + +if HAVE_INTROSPECTION + +if USE_GTK3 +GTKVAPI = gtk+-3.0 +else +GTKVAPI = gtk+-2.0 +endif + +vapidir = $(datadir)/vala/vapi +vapiprefix = appindicator$(VER)-0.1 +vapi_DATA = $(vapiprefix).vapi $(vapiprefix).deps +DEPS = $(GTKVAPI) + +$(vapiprefix).deps: + echo $(DEPS) > $@ + +$(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir $(vapiprefix).deps + $(VALA_API_GEN) --library=$(vapiprefix) \ + --pkg $(GTKVAPI) \ + $< + + +CLEANFILES = $(vapi_DATA) + +endif -- cgit v1.2.3 From 3f2a4ba6563e8d5ba35e65710dc70e81214baaf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 3 Feb 2011 18:54:18 +0100 Subject: vala bindings makefile: just use deps file for dependencies --- bindings/vala/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bindings/vala/Makefile.am') diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am index c4627f5..5a923a5 100644 --- a/bindings/vala/Makefile.am +++ b/bindings/vala/Makefile.am @@ -23,8 +23,7 @@ $(vapiprefix).deps: $(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir $(vapiprefix).deps $(VALA_API_GEN) --library=$(vapiprefix) \ - --pkg $(GTKVAPI) \ - $< + $< CLEANFILES = $(vapi_DATA) -- cgit v1.2.3 From 6cc0ff8c6f108324dd2310569b870b8586930712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 4 Feb 2011 01:33:35 +0100 Subject: Vala bindings: add metadata as build dependencies, support for gtk3 --- bindings/vala/Makefile.am | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bindings/vala/Makefile.am') diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am index 5a923a5..3c17075 100644 --- a/bindings/vala/Makefile.am +++ b/bindings/vala/Makefile.am @@ -1,6 +1,5 @@ SUBDIRS = . examples - ######################### # VAPI Files ######################### @@ -9,8 +8,10 @@ if HAVE_INTROSPECTION if USE_GTK3 GTKVAPI = gtk+-3.0 +VER=3 else GTKVAPI = gtk+-2.0 +VER= endif vapidir = $(datadir)/vala/vapi @@ -21,8 +22,10 @@ DEPS = $(GTKVAPI) $(vapiprefix).deps: echo $(DEPS) > $@ -$(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir $(vapiprefix).deps - $(VALA_API_GEN) --library=$(vapiprefix) \ +$(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir \ + $(top_builddir)/src/AppIndicator$(VER)-0.1.metadata \ + $(vapiprefix).deps + $(VALA_API_GEN) --library=$(vapiprefix) --girdir=$(srcdir)/src \ $< -- cgit v1.2.3 From 32a1bf9cbb537a759c5fd8484c9eb37d5fa17d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 4 Feb 2011 01:48:02 +0100 Subject: Always check if vapigen is available when building VAPI --- bindings/vala/Makefile.am | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bindings/vala/Makefile.am') diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am index 3c17075..f80b48c 100644 --- a/bindings/vala/Makefile.am +++ b/bindings/vala/Makefile.am @@ -1,11 +1,12 @@ +if HAVE_INTROSPECTION +if HAVE_VAPIGEN + SUBDIRS = . examples ######################### # VAPI Files ######################### -if HAVE_INTROSPECTION - if USE_GTK3 GTKVAPI = gtk+-3.0 VER=3 @@ -32,3 +33,4 @@ $(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir \ CLEANFILES = $(vapi_DATA) endif +endif -- cgit v1.2.3