automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, tests-init, updated. v1.11-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, tests-init, updated. v1.11-430-gd40b95d
Date: Wed, 22 Dec 2010 10:05:57 +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=d40b95dca3b7b5f03b17772ad8367690d030e5e8

The branch, tests-init has been updated
       via  d40b95dca3b7b5f03b17772ad8367690d030e5e8 (commit)
      from  633f37600999b5736443e6ad3d94edbd29e55184 (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 d40b95dca3b7b5f03b17772ad8367690d030e5e8
Author: Stefano Lattarini <address@hidden>
Date:   Wed Dec 22 10:36:18 2010 +0100

    Tests defs: keep track of original $AUTOMAKE and $ACLOCAL values.
    
    This is especially useful for tests which might want to run
    automake and aclocal without additional flags and warnings.
    
    * tests/defs-static.in ($original_ACLOCAL): New variable.
    ($original_AUTOMAKE): Likewise.
    * tests/help.test: Use them.
    * tests/help2.test: Likewise.
    * tests/help3.test: Likewise.
    * tests/help4.test: Likewise.
    
    From a suggestion by Ralf Wildenhues.

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

Summary of changes:
 ChangeLog            |   13 +++++++++++++
 tests/defs-static.in |   22 ++++++++++++++++++----
 tests/help.test      |    7 ++++---
 tests/help2.test     |    7 ++++---
 tests/help3.test     |    7 ++++---
 tests/help4.test     |    7 ++++---
 6 files changed, 47 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ad68203..378742e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-22  Stefano Lattarini  <address@hidden>
+
+       Tests defs: keep track of original $AUTOMAKE and $ACLOCAL values.
+       This is especially useful for tests which might want to run
+       automake and aclocal without additional flags and warnings.
+       * tests/defs-static.in ($original_ACLOCAL): New variable.
+       ($original_AUTOMAKE): Likewise.
+       * tests/help.test: Use them.
+       * tests/help2.test: Likewise.
+       * tests/help3.test: Likewise.
+       * tests/help4.test: Likewise.
+       From a suggestion by Ralf Wildenhues.
+
 2010-12-13  Stefano Lattarini  <address@hidden>
            Ralf Wildenhues  <address@hidden>
 
diff --git a/tests/defs-static.in b/tests/defs-static.in
index 2ca4b57..c4ae758 100644
--- a/tests/defs-static.in
+++ b/tests/defs-static.in
@@ -51,8 +51,16 @@ test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
 test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
 test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
 test -z "$MISSING" && MISSING=$top_testsrcdir/lib/missing
+
 # Use -Werror because this also turns some Perl warnings into error.
-# (Tests for which this is inappropriate should use -Wno-error.)
+# Tests for which this is inappropriate should use -Wno-error.
+# Tests who want complete control over aclocal command-line options
+# should use $original_ACLOCAL.
+# Note: the first `test -z' conditional below is to ensure defs-static
+# really remains idempotent.
+if test -z "$original_ACLOCAL"; then
+  original_ACLOCAL=${ACLOCAL-"aclocal-$APIVERSION"}
+fi
 test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
 # Extra flags to pass to aclocal before all other flags added by this script.
 ACLOCAL_TESTSUITE_FLAGS=''; export ACLOCAL_TESTSUITE_FLAGS
@@ -60,9 +68,15 @@ ACLOCAL_TESTSUITE_FLAGS=''; export ACLOCAL_TESTSUITE_FLAGS
 # See how Automake should be run.  We put --foreign as the default
 # strictness to avoid having to create lots and lots of files.  A test
 # can override this by specifying a different strictness.  Use -Wall
-# -Werror by default.  Tests for which this is inappropriate
-# (e.g. when testing that a warning is enabled by a specific switch)
-# should use -Wnone or/and -Wno-error
+# -Werror by default.  Tests for which this is inappropriate (e.g. when
+# testing that a warning is enabled by a specific switch) should use
+# -Wnone or/and -Wno-error.  Tests who want complete control over
+# automake command-line options should use $original_AUTOMAKE.
+# Note: the first `test -z' conditional below is to ensure defs-static
+# really remains idempotent.
+if test -z "$original_AUTOMAKE"; then
+  original_AUTOMAKE=${AUTOMAKE-"automake-$APIVERSION"}
+fi
 test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
 
 # POSIX no longer requires 'egrep' and 'fgrep',
diff --git a/tests/help.test b/tests/help.test
index dd8b3b4..d8aa96f 100755
--- a/tests/help.test
+++ b/tests/help.test
@@ -25,9 +25,10 @@ set -e
 mkdir emptydir
 cd emptydir
 
-# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+# Honour user overrides for $ACLOCAL and $AUTOMAKE, but without
+# adding extra options.
+ACLOCAL=$original_ACLOCAL
+AUTOMAKE=$original_AUTOMAKE
 
 $ACLOCAL --version
 $ACLOCAL --help
diff --git a/tests/help2.test b/tests/help2.test
index 5212092..384507f 100755
--- a/tests/help2.test
+++ b/tests/help2.test
@@ -24,9 +24,10 @@ set -e
 mkdir cleandir
 cd cleandir
 
-# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+# Honour user overrides for $ACLOCAL and $AUTOMAKE, but without
+# adding extra options.
+ACLOCAL=$original_ACLOCAL
+AUTOMAKE=$original_AUTOMAKE
 
 echo '[' > configure.in
 
diff --git a/tests/help3.test b/tests/help3.test
index 72399e3..d3652ea 100755
--- a/tests/help3.test
+++ b/tests/help3.test
@@ -24,9 +24,10 @@ set -e
 mkdir cleandir
 cd cleandir
 
-# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+# Honour user overrides for $ACLOCAL and $AUTOMAKE, but without
+# adding extra options.
+ACLOCAL=$original_ACLOCAL
+AUTOMAKE=$original_AUTOMAKE
 
 cat > configure.in <<END
 AC_INIT([$me], [1.0])
diff --git a/tests/help4.test b/tests/help4.test
index c5eb31e..ab377e6 100755
--- a/tests/help4.test
+++ b/tests/help4.test
@@ -25,9 +25,10 @@ set -e
 mkdir emptydir
 cd emptydir
 
-# Honour user overrides for $ACLOCAL and $AUTOMAKE.
-ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
-AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+# Honour user overrides for $ACLOCAL and $AUTOMAKE, but without
+# adding extra options.
+ACLOCAL=$original_ACLOCAL
+AUTOMAKE=$original_AUTOMAKE
 
 escape_dots () { sed 's/\./\\./g'; } # avoid issues with `\' in backquotes
 apiversion_rx=`echo "$APIVERSION" | escape_dots`


hooks/post-receive
-- 
GNU Automake



reply via email to

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