[seahorse] Makefile.am: Disable building of vala during distcheck



commit 2ae93162cbd68ffd5dae54833e3a43ddbf7af26c
Author: Stef Walter <stefw gnome org>
Date:   Mon Mar 3 12:39:51 2014 +0100

    Makefile.am: Disable building of vala during distcheck
    
    This way we can check that we distributed all the correct
    built sources in the tarball.

 Makefile.am        |    5 +++--
 common/Makefile.am |    2 ++
 configure.ac       |   16 +++++++++++++++-
 gkr/Makefile.am    |    2 ++
 pkcs11/Makefile.am |    2 ++
 5 files changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8a358a6..48ef992 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,8 +36,9 @@ DISTCHECK_CONFIGURE_FLAGS = \
     --disable-scrollkeeper \
     --disable-update-mime-database \
     --disable-debug \
-    --disable-strict
-    
+    --disable-strict \
+    --disable-valac
+
 CHANGELOG_START = \
        d2f8367dc600080b6cf3edbe4e2fc204f929471e
 
diff --git a/common/Makefile.am b/common/Makefile.am
index 2f94e74..3c7f5ed 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -30,10 +30,12 @@ libcommon_la_SOURCES = \
 libcommon_la_CFLAGS = \
        -include config.h -w
 
+if WITH_VALAC
 $(common_HEADER): $(common_VALA)
        $(V_VALAC) $(VALAC) $(VALA_FLAGS) -C --use-header --header=$(common_HEADER) \
                --vapidir=$(srcdir)/common --pkg gtk+-3.0 --pkg gcr-3 --pkg config \
                --vapi=common.vapi --directory=common $^
+endif
 
 $(common_C): $(common_HEADER)
 
diff --git a/configure.ac b/configure.ac
index 4dd216e..df0cf86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,6 @@ AC_CONFIG_MACRO_DIR([build/m4])
 AC_PROG_CC
 AC_PROG_CXX
 AM_PROG_CC_C_O
-AM_PROG_VALAC([0.18.0])
 AC_PROG_INTLTOOL([0.35.0])
 AM_PROG_LIBTOOL
 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
@@ -68,6 +67,20 @@ else
 fi
 AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
 
+AC_MSG_CHECKING(whether to build with valac)
+AC_ARG_ENABLE(valac,
+              AC_HELP_STRING([--disable-valac],
+                             [Build without invoking valac]))
+if test "$enable_valac" = "no"; then
+       VALAC="/bin/false/without-valac"
+       AC_SUBST(VALAC)
+else
+       enable_valac="yes"
+       AM_PROG_VALAC([0.22.0])
+fi
+AM_CONDITIONAL(WITH_VALAC, test "$enable_valac" = "yes")
+AC_MSG_RESULT($enable_valac)
+
 GNOME_CODE_COVERAGE
 CFLAGS="$CFLAGS $CODE_COVERAGE_CFLAGS"
 LDFLAGS="$LDFLAGS $CODE_COVERAGE_LDFLAGS"
@@ -573,5 +586,6 @@ Keyserver Support:          $with_keyserver
   Key Sharing:              $enable_sharing
 Debug:                      $debug_status
 Strict:                     $strict_status
+Vala build:                 $enable_valac
 Coverage:                   $enable_coverage
 "
diff --git a/gkr/Makefile.am b/gkr/Makefile.am
index 0d45432..b4dd7d4 100644
--- a/gkr/Makefile.am
+++ b/gkr/Makefile.am
@@ -25,11 +25,13 @@ libseahorse_gkr_la_CFLAGS = \
        -include config.h -w \
        -DSECRET_API_SUBJECT_TO_CHANGE
 
+if WITH_VALAC
 $(gkr_HEADER): $(gkr_VALA)
        $(V_VALAC) $(VALAC) $(VALA_FLAGS) -C --use-header --header=$(gkr_HEADER) \
                --vapidir=$(builddir)/common --vapidir=$(srcdir)/common \
                --pkg common --pkg config --pkg gtk+-3.0 --pkg gcr-3 --pkg gcr-ui-3 --pkg libsecret-1 \
                --directory=gkr $^
+endif
 
 $(gkr_C): $(gkr_HEADER)
 
diff --git a/pkcs11/Makefile.am b/pkcs11/Makefile.am
index a69ef2d..e38b4f5 100644
--- a/pkcs11/Makefile.am
+++ b/pkcs11/Makefile.am
@@ -26,11 +26,13 @@ libseahorse_pkcs11_la_SOURCES = \
 libseahorse_pkcs11_la_CFLAGS = \
        -include config.h -w
 
+if WITH_VALAC
 $(pkcs11_HEADER): $(pkcs11_VALA)
        $(V_VALAC) $(VALAC) $(VALA_FLAGS) -C --use-header --header=$(pkcs11_HEADER) \
                --vapidir=$(builddir)/common --vapidir=$(srcdir)/common \
                --pkg common --pkg config --pkg gtk+-3.0  --pkg gcr-3 --pkg gcr-ui-3 --pkg pkcs11 \
                --directory=pkcs11 $^
+endif
 
 $(pkcs11_C): $(pkcs11_HEADER)
 


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