From ba510b44f445a8b22d94934549eedff5e2b3445b Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Thu, 22 Dec 2011 12:53:44 +0100 Subject: [PATCH] Disable vala bindings unless --enable-vala is used Currently, building vala bindings from a tarball is broken because spice-client-glib-2.0.deps is missing from the tarball. This commit adds it to EXTRA_DIST and also makes sure the vala bindings don't get built/installed unless --enable-vala has been passed to configure. This means vala must be installed to build the vala bindings from a tarball. --- Makefile.am | 16 ++++++++++++++-- autogen.sh | 2 +- vapi/Makefile.am | 26 ++++++++++---------------- vapi/spice-client-gtk-2.0.deps | 2 ++ vapi/spice-client-gtk-3.0.deps | 2 ++ 5 files changed, 29 insertions(+), 19 deletions(-) create mode 100644 vapi/spice-client-gtk-2.0.deps create mode 100644 vapi/spice-client-gtk-3.0.deps diff --git a/Makefile.am b/Makefile.am index 9825349..48b7b46 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,12 @@ ACLOCAL_AMFLAGS = -I m4 NULL = -SUBDIRS = common gtk po python_modules doc data vapi +SUBDIRS = common gtk po python_modules doc data +if HAVE_INTROSPECTION +if WITH_VALA +SUBDIRS += vapi +endif +endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ @@ -58,7 +63,14 @@ BUILT_SOURCES = $(top_srcdir)/.version $(top_srcdir)/.version: echo $(VERSION) > $@-t && mv $@-t $@ -DISTCHECK_CONFIGURE_FLAGS = --enable-introspection --enable-werror --enable-gtk-doc +DISTCHECK_CONFIGURE_FLAGS = \ + --enable-introspection \ + --disable-vala \ + --disable-usbredir \ + --enable-gtk-doc \ + --enable-werror \ + --with-gtk=3.0 \ + $(NULL) spicy-for-windows.exe: PATH=$$PATH:/usr/i686-pc-mingw32/sys-root/mingw/bin/:/usr/i686-pc-mingw32/sys-root/mingw/lib \ diff --git a/autogen.sh b/autogen.sh index 904c00e..2724d7e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -13,6 +13,6 @@ if test ! -e gtk/controller/controller.vala.stamp; then fi if [ -z "$NOCONFIGURE" ]; then - "$srcdir"/configure --enable-maintainer-mode $enable_vala ${1+"$@"} + "$srcdir"/configure --enable-maintainer-mode --enable-gtk-doc --with-gtk=3.0 $enable_vala ${1+"$@"} fi diff --git a/vapi/Makefile.am b/vapi/Makefile.am index 4b99645..ccb5b65 100644 --- a/vapi/Makefile.am +++ b/vapi/Makefile.am @@ -1,19 +1,20 @@ NULL = CLEANFILES = -if HAVE_INTROSPECTION -if WITH_VALA -BUILT_VAPI = \ +vapidir = $(datadir)/vala/vapi +vapi_DATA = \ spice-client-glib-2.0.vapi \ - spice-client-gtk-$(SPICE_GTK_API_VERSION).deps \ spice-client-gtk-$(SPICE_GTK_API_VERSION).vapi \ $(NULL) -CLEANFILES += $(BUILT_VAPI) - -vapidir = $(datadir)/vala/vapi -vapi_DATA = \ +dist_vapi_DATA = \ + spice-client-gtk-$(SPICE_GTK_API_VERSION).deps \ spice-client-glib-2.0.deps \ - $(BUILT_VAPI) + $(NULL) + +BUILT_SOURCES = $(vapi_DATA) +EXTRA_DIST = \ + spice-client-gtk-2.0.deps \ + spice-client-gtk-3.0.deps \ $(NULL) spice-client-glib-2.0.vapi: $(top_builddir)/gtk/SpiceClientGLib-2.0.gir @@ -30,11 +31,4 @@ spice-client-gtk-$(SPICE_GTK_API_VERSION).vapi: $(top_builddir)/gtk/SpiceClientG --library spice-client-gtk-$(SPICE_GTK_API_VERSION) \ $< -spice-client-gtk-$(SPICE_GTK_API_VERSION).deps: spice-client-gtk-$(SPICE_GTK_API_VERSION).vapi - @echo "spice-client-glib-2.0" > $@ - @echo "gtk+-$(GTK_API_VERSION)" >> $@ - -endif -endif - -include $(top_srcdir)/git.mk diff --git a/vapi/spice-client-gtk-2.0.deps b/vapi/spice-client-gtk-2.0.deps new file mode 100644 index 0000000..8991f34 --- /dev/null +++ b/vapi/spice-client-gtk-2.0.deps @@ -0,0 +1,2 @@ +spice-client-glib-2.0 +gtk+-2.0 diff --git a/vapi/spice-client-gtk-3.0.deps b/vapi/spice-client-gtk-3.0.deps new file mode 100644 index 0000000..d04a10b --- /dev/null +++ b/vapi/spice-client-gtk-3.0.deps @@ -0,0 +1,2 @@ +spice-client-glib-2.0 +gtk+-3.0 -- 1.7.7.4