automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11b-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11b-129-g3eec8e2
Date: Tue, 24 Apr 2012 09:31:30 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=3eec8e2434a34d673e66eae1817f8a88960656db

The branch, ng/master has been updated
       via  3eec8e2434a34d673e66eae1817f8a88960656db (commit)
       via  f450cd19f4efa6ab3bafa072d7756239b6888ae0 (commit)
       via  814e32696ca0cdd402624db132dedf0d3379e033 (commit)
       via  c9a4f6a88d739ba2d1a090415ede318c17cfb19f (commit)
       via  509b231118fff35e8f5dbfa797218265e8bc6acc (commit)
       via  001db08953af104250a2d00f7e46c9b4817d2ced (commit)
      from  35341b28e47f9725c9d79b7a37bec3139773045f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3eec8e2434a34d673e66eae1817f8a88960656db
Merge: 814e326 f450cd1
Author: Stefano Lattarini <address@hidden>
Date:   Tue Apr 24 10:52:34 2012 +0200

    Merge branch 'master' into ng/master
    
    * master:
      coverage: test the internal $(am__relativize) variable
      coverage: parallel make with vala
      vala: configure exit with status 77, not 1, if valac version is too old

commit 814e32696ca0cdd402624db132dedf0d3379e033
Author: Stefano Lattarini <address@hidden>
Date:   Mon Apr 23 20:37:47 2012 +0200

    [ng] dist: remove workaround needed by BSD make only
    
    * am/lib/configure.am (distcheck): GNU make (without the '.ONESHELL'
    special target specified, which we don't support anyway) is assured
    not to re-use the same shell in different commands of the same recipe,
    so we can slightly simplify our rule accordingly, removing workarounds
    that were only relevant fr BSD make when run in parallel mode.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c9a4f6a88d739ba2d1a090415ede318c17cfb19f
Author: Stefano Lattarini <address@hidden>
Date:   Mon Apr 23 20:06:31 2012 +0200

    [ng] remake: don't depend explicitly on Makefile
    
    * am/lib/configure.am (am--refresh): No need to explicitly depend
    on %MAKEFILE%, as GNU make will always make sure %MAKEFILE% is
    updated before considering the am--refresh target anyway.  Also,
    this target don't need a recipe, so don't add any.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 NEWS                |    3 ++
 lib/am/configure.am |   10 ++---
 lib/am/distdir.am   |    8 +----
 m4/vala.m4          |    4 +-
 t/list-of-tests.mk  |    2 +
 t/relativize.tap    |   96 +++++++++++++++++++++++++++++++++++++++++++++++++++
 t/vala-headers.sh   |    4 ++-
 t/vala-libs.sh      |    4 ++-
 t/vala-parallel.sh  |   74 +++++++++++++++++++++++++++++++++++++++
 t/vala-vpath.sh     |    2 +-
 t/vala2.sh          |    4 ++-
 t/vala3.sh          |    4 ++-
 t/vala4.sh          |   12 +++++--
 t/vala5.sh          |    2 +-
 14 files changed, 205 insertions(+), 24 deletions(-)
 create mode 100755 t/relativize.tap
 create mode 100755 t/vala-parallel.sh

diff --git a/NEWS b/NEWS
index 0410158..75ca31f 100644
--- a/NEWS
+++ b/NEWS
@@ -182,6 +182,9 @@ New in 1.11e:
 
 * Miscellaneous changes:
 
+  - The AM_PROG_VALAC macro now causes configure to exit with status 77,
+    rather than 1, if the vala compiler found is too old.
+
   - The build system of Automake itself now avoids the use of make
     recursion as much as possible.
 
diff --git a/lib/am/configure.am b/lib/am/configure.am
index 3fc2fc7..e0cd443 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -16,14 +16,12 @@
 
 
 ## This dummy rule is called from subdirectories whenever one of the
-## top-level Makefile's dependencies must be updated.  It does depend
-## on %MAKEFILE% for the benefit of non-GNU make implementations (GNU
-## make will always make sure %MAKEFILE% is updated before considering
-## the am--refresh target anyway).
+## top-level Makefile's dependencies must be updated; it relies on
+## the fact that GNU make always make sure the Makefile is updated
+## before considering the other rules.
 if %?TOPDIR_P%
 .PHONY: am--refresh
-am--refresh: %MAKEFILE%
-       @:
+am--refresh:
 endif %?TOPDIR_P%
 
 ## --------------------- ##
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 7374eea..bb2d2a7 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -469,9 +469,6 @@ distcheck: dist
 ## create very long directory names.
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
 ?DISTCHECK-HOOK?         && $(MAKE) distcheck-hook \
-## Parallel BSD make may not start a new shell for each command in a recipe,
-## so be sure to 'cd' back to the original directory after this.
-         && am__cwd=`pwd` \
          && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 ?GETTEXT?          --with-included-gettext \
@@ -511,10 +508,7 @@ distcheck: dist
          && $(MAKE) dist \
 ## Make sure to remove the dists we created in the test build directory.
          && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) distcleancheck \
-## Cater to parallel BSD make (see above).
-         && cd "$$am__cwd" \
-         || exit 1
+         && $(MAKE) distcleancheck
        $(am__post_remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
diff --git a/m4/vala.m4 b/m4/vala.m4
index ea7e5f7..cc6ba53 100644
--- a/m4/vala.m4
+++ b/m4/vala.m4
@@ -6,7 +6,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
+# serial 6
 
 # Check whether the Vala compiler exists in $PATH. If it is found, the
 # variable VALAC is set. Optionally a minimum release number of the
@@ -25,5 +25,5 @@ AC_DEFUN([AM_PROG_VALAC],
          [AC_MSG_RESULT([yes])],
          [AC_MSG_RESULT([yes])],
          [AC_MSG_RESULT([no])
-          AC_MSG_ERROR([Vala $1 not found.])])])])
+          AC_MSG_ERROR([Vala $1 not found.], [77])])])])
 ])
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 5c67db5..57bb8ad 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -882,6 +882,7 @@ t/python-virtualenv.sh \
 t/python-pr10995.sh \
 t/recurs.sh \
 t/recurs2.sh \
+t/relativize.tap \
 t/remake.sh \
 t/remake1a.sh \
 t/remake2.sh \
@@ -1195,6 +1196,7 @@ t/vala-libs.sh \
 t/vala-vpath.sh \
 t/vala-mix.sh \
 t/vala-mix2.sh \
+t/vala-parallel.sh \
 t/vars.sh \
 t/vars-assign.sh \
 t/vartar.sh \
diff --git a/t/relativize.tap b/t/relativize.tap
new file mode 100755
index 0000000..8f53b6c
--- /dev/null
+++ b/t/relativize.tap
@@ -0,0 +1,96 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test Automake-provided internal make macro $(am__relativize).
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+plan_ later
+
+mkdir uber uber/top
+cd uber/top
+
+: > install-sh
+: > missing
+
+cat >> configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+# The 'am__relitivize' definition is only brought in when
+# SUBDIRS are defined.
+SUBDIRS = .
+
+.PHONY: test
+test:
+       @$(am__relativize); echo "result: '$$reldir'"; set -x; \
+        case $${reldir:-.} in "$$exp"|"$$exp/.") ;; *) exit 1;; esac
+END
+
+$ACLOCAL && $AUTOMAKE && $AUTOCONF && ./configure || fatal_ "setup failure"
+
+rel_ ()
+{
+   case $1 in -x) directive=TODO; shift;; *) directive=;; esac
+   test $# -eq 4 && test x"$3" = x"=" || fatal_ "rel_: incorrect usage"
+   command_ok_ "$1/{$4} = $2" -D "$directive" \
+               env dir1=$1 dir2=$2 exp=$4 $MAKE test
+}
+
+# am__relativize
+# ~~~~~~~~~~~~~~
+# Computes a relative pathname RELDIR such that DIR1/RELDIR = DIR2.
+# Input:
+#   - DIR1     relative pathname, relative to the current directory
+#   - DIR2     relative pathname, relative to the current directory
+# Output:
+#   - reldir   relative pathname of DIR2, relative to DIR1
+
+rel_ . .  = .
+rel_ . .. = ..
+rel_ .. . = top
+
+for d in x long-longer a/b 1/2/3/4/5; do
+  rel_ $d $d = .
+  for d2 in . .. x r/s/t; do
+    rel_ $d $d/$d2 = $d2
+  done
+done
+
+rel_ one two     = ../two
+rel_ a   b/c     = ../b/c
+rel_ a/b .       = ../..
+rel_ a/b foo     = ../../foo
+rel_ a/b foo/bar = ../../foo/bar
+rel_ a/b a/c     = ../c
+rel_ a/b a/c/d   = ../c/d
+
+rel_ foo/bar/baz foo/bar/qux/zap   = ../qux/zap
+
+rel_ ../foo       .      = ../top
+rel_ ../..        .      = uber/top
+rel_ ../../foo    .      = ../uber/top
+rel_ ../../x      ok     = ../uber/top/ok
+rel_ ../../x      bo/ba  = ../uber/top/bo/ba
+rel_ ../../x      ../ok2 = ../uber/top/../ok2
+rel_ ../a/b/c/d/e .      = ../../../../../top
+
+:
diff --git a/t/vala-headers.sh b/t/vala-headers.sh
index 2dc4391..2e1b5be 100755
--- a/t/vala-headers.sh
+++ b/t/vala-headers.sh
@@ -62,7 +62,9 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure || skip_ "configure failure"
+grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
+
+./configure
 $MAKE
 
 # Test rebuild rules.
diff --git a/t/vala-libs.sh b/t/vala-libs.sh
index 71ce3b3..567d5b3 100755
--- a/t/vala-libs.sh
+++ b/t/vala-libs.sh
@@ -49,7 +49,9 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure || skip_ "configure failed"
+grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
+
+./configure
 
 cat > mu2.c << 'END'
 #include "mu2.h"
diff --git a/t/vala-parallel.sh b/t/vala-parallel.sh
new file mode 100755
index 0000000..8b6aff5
--- /dev/null
+++ b/t/vala-parallel.sh
@@ -0,0 +1,74 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Vala support with parallel make.
+
+required='valac cc GNUmake'
+. ./defs || Exit 1
+
+cat >> configure.ac <<'END'
+AC_PROG_CC
+AC_PROG_CXX
+AM_PROG_VALAC([0.7.3])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = zardoz
+AM_VALAFLAGS = --profile=posix
+zardoz_SOURCES = main.vala 1.vala 2.vala 3.vala 4.vala 5.vala 6.vala
+END
+
+echo 'int main () {' > main.vala
+for i in 1 2 3 4 5 6; do
+  echo "void foo$i () { stdout.printf (\"ok $i\\n\"); }" > $i.vala
+  echo "foo$i ();" >> main.vala
+done
+echo 'return 0; }' >> main.vala
+
+cat main.vala # For debugging.
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+
+./configure
+
+$MAKE -j3
+ls -l # For debugging.
+for x in main 1 2 3 4 5 6; do test -f $x.c; done
+test -f  zardoz_vala.stamp
+
+$MAKE maintainer-clean -j4
+ls -l # For debugging.
+for x in main 1 2 3 4 5 6; do test ! -f $x.c; done
+test ! -f zardoz_vala.stamp
+
+mkdir build
+cd build
+../configure
+$MAKE -j6
+ls -l . .. # For debugging.
+for x in main 1 2 3 4 5 6; do test -f ../$x.c; done
+test -f ../zardoz_vala.stamp
+
+$MAKE distcheck -j4
+
+$MAKE maintainer-clean -j2
+for x in main 1 2 3 4 5 6; do test ! -f ../$x.c; done
+test ! -f ../zardoz_vala.stamp
+
+:
diff --git a/t/vala-vpath.sh b/t/vala-vpath.sh
index 2670cb9..514d0e6 100755
--- a/t/vala-vpath.sh
+++ b/t/vala-vpath.sh
@@ -49,7 +49,7 @@ $AUTOMAKE
 
 mkdir build
 cd build
-../configure || Exit 77
+../configure
 $MAKE
 test -f ../foo_vala.stamp
 test -f ../bar_vala.stamp
diff --git a/t/vala2.sh b/t/vala2.sh
index 407ccac..cfbffc1 100755
--- a/t/vala2.sh
+++ b/t/vala2.sh
@@ -56,7 +56,9 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure || skip_ "configure failure"
+grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
+
+./configure
 $MAKE
 
 # Test rebuild rules.
diff --git a/t/vala3.sh b/t/vala3.sh
index b2de400..0306290 100755
--- a/t/vala3.sh
+++ b/t/vala3.sh
@@ -50,7 +50,9 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure || skip_ "configure failure"
+grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
+
+./configure
 $MAKE
 test -f src/zardoz.c
 test -f src_zardoz_vala.stamp
diff --git a/t/vala4.sh b/t/vala4.sh
index 067ea3f..879803f 100755
--- a/t/vala4.sh
+++ b/t/vala4.sh
@@ -43,16 +43,22 @@ cwd=`pwd`
 $ACLOCAL
 $AUTOMAKE -a
 $AUTOCONF
-./configure "VALAC=$cwd/valac" || Exit $?
+
+# The "|| Exit 1" is required here even if 'set -e' is active,
+# because ./configure migt exit with status 77, and in that case
+# we want to FAIL, not to SKIP.
+./configure "VALAC=$cwd/valac" || Exit 1
 
 sed 's/AM_PROG_VALAC.*/AM_PROG_VALAC([9999.9])/' < configure.ac >t
 mv -f t configure.ac
 $AUTOCONF --force
-./configure "VALAC=$cwd/valac" && Exit 1
+st=0; ./configure "VALAC=$cwd/valac" || st=$?
+test $st -eq 77 || Exit 1
 
 sed 's/AM_PROG_VALAC.*/AM_PROG_VALAC([1.2.3])/' < configure.ac >t
 mv -f t configure.ac
 $AUTOCONF --force
-./configure "VALAC=$cwd/valac" || Exit $?
+# See comments above for why "|| Exit 1" is needed.
+./configure "VALAC=$cwd/valac" || Exit 1
 
 :
diff --git a/t/vala5.sh b/t/vala5.sh
index 8a274ff..223d2e4 100755
--- a/t/vala5.sh
+++ b/t/vala5.sh
@@ -70,7 +70,7 @@ $AUTOMAKE -a
 
 grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
 
-./configure || skip_ "configure failure"
+./configure
 $MAKE
 
 if cross_compiling; then :; else


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]