[gexiv2] Don't "make vapi" unless building from git checkout: Closes bgo#723704



commit 0d7066cec1f5f191e9748098803fd0e321a481fb
Author: Jim Nelson <jim yorba org>
Date:   Wed Feb 5 11:35:46 2014 -0800

    Don't "make vapi" unless building from git checkout: Closes bgo#723704
    
    There's really no need for a tarball build to generate the VAPI file,
    so that capability's been removed.  "make vapi" will only work from
    within a repo checkout.

 .gitignore    |    4 ++--
 Makefile.am   |   22 ++++++----------------
 configure.ac  |   34 +---------------------------------
 vapi/Makefile |   11 +++++++++++
 4 files changed, 20 insertions(+), 51 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 281b25e..63fde82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,8 +12,8 @@ vapi/gexiv2.gi
 test/gexiv2-dump
 
 # Autotools files.
-Makefile.in
-Makefile
+/Makefile.in
+/Makefile
 configure
 build-aux/
 config.log
diff --git a/Makefile.am b/Makefile.am
index e42b5df..fb76017 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,6 +33,12 @@ py3gi_DATA      = GExiv2.py
 endif
 endif
 
+.PHONY: vapi
+vapi:
+       @echo NOTE: This version of gexiv2 $(GEXIV2_VERSION) must be installed to generate a VAPI file.
+       pkg-config --exact-version=$(GEXIV2_VERSION) --print-errors gexiv2
+       make -C vapi
+
 GEXIV2_public_HEADERS = \
        gexiv2/gexiv2.h \
        gexiv2/gexiv2-metadata.h \
@@ -100,22 +106,6 @@ clean-local:
        rm -f gexiv2.pc
        rm -f test/gexiv2-dump
 
-# Vala #
-
-if ENABLE_VALA
-
-vapi: @PACKAGE_NAME  vapi
-
- PACKAGE_NAME@.vapi: vapi/@PACKAGE_NAME  gi
-       vapigen --library= PACKAGE_NAME@ --metadatadir=vapi vapi/@PACKAGE_NAME  gi
-
-vapi/@PACKAGE_NAME  gi:
-       @echo NOTE: This version of gexiv2 must be installed to generate a VAPI file.
-       pkg-config --exact-version=$(GEXIV2_VERSION) --print-errors @PACKAGE_NAME@
-       vala-gen-introspect @PACKAGE_NAME@ vapi
-
-endif
-
 # Tests and utilities #
 
 if ENABLE_TESTS
diff --git a/configure.ac b/configure.ac
index 241fed7..768ac3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -139,35 +139,11 @@ fi
 AM_CONDITIONAL(HAS_PYTHON2, test "x$PYTHON2_GIDIR" != "x")
 AM_CONDITIONAL(HAS_PYTHON3, test "x$PYTHON3_GIDIR" != "x")
 
-#################
-# Vala Binding  #
-#################
-
-AC_ARG_ENABLE(vala, [  --disable-vala          disable vala binding [[default=no]]],
-              if eval "test x$enable_vala = xno"; then
-              enable_vala=no
-              else
-              enable_vala=yes
-              fi,
-              enable_vala=yes)
-
-if test "x$enable_vala" != "xno"; then
-    AC_CHECK_TOOL([VAPIGEN], [vapigen], [:])
-    AC_CHECK_TOOL([VALA_GEN_INSTROSPECT], [vala-gen-introspect], [:])
-    if test "x$VAPIGEN" = "x:" || test "x$VALA_GEN_INSTROSPECT" = "x:"; then
-        enable_vala="no (missing vapigen and/or vala-gen-introspect)"
-    fi
-fi
-AM_CONDITIONAL(ENABLE_VALA, test "x$enable_vala" = "xyes")
-
-AC_MSG_CHECKING([enable vala])
-AC_MSG_RESULT([$enable_vala])
-
 #######################
 # Tests and utilities #
 #######################
 
-AC_ARG_ENABLE(tests, [  --enable-tests         enable tests and utilities (requires Vala) [[default=no]]],
+AC_ARG_ENABLE(tests, [  --enable-tests          enable tests and utilities (requires Vala) [[default=no]]],
               if eval "test x$enable_tests = xno"; then
               enable_tests=no
               else
@@ -261,20 +237,12 @@ AC_MSG_RESULT([
 GExiv2 will be built with prefix $prefix for $host (cross-compiling: $cross_compiling).
 
 Options:
-    Vala binding:       $enable_vala
     Introspection:      $enable_introspection
     Python2 binding:    $enable_python2
     Python3 binding:    $enable_python3
     Tests and utils:    $enable_tests
 ])
 
-if test "x$enable_vala" = "xyes"; then
-AC_MSG_RESULT([
-NOTE: the Vala binding can only be built and installed after the C API.
-After installing with "make install", run "make vapi" to build the bindings and "make install-vapi" to 
install them.
-])
-fi
-
 if test "x$enable_tests" = "xyes"; then
 AC_MSG_RESULT([To build tests and utiliies, run "make tests".])
 fi
diff --git a/vapi/Makefile b/vapi/Makefile
new file mode 100644
index 0000000..2a2fc65
--- /dev/null
+++ b/vapi/Makefile
@@ -0,0 +1,11 @@
+#
+# For manually building the distributed VAPI file
+#
+
+../gexiv2.vapi: gexiv2.gi
+       vapigen --library=gexiv2 --metadatadir=. gexiv2.gi
+       mv gexiv2.vapi ..
+
+gexiv2.gi: gexiv2.deps gexiv2.excludes gexiv2.files gexiv2.metadata gexiv2.namespace
+       vala-gen-introspect gexiv2 .
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]