]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Tests defs: $srcdir renaming.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 2 Jun 2010 19:55:23 +0000 (21:55 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 5 Sep 2010 23:06:23 +0000 (01:06 +0200)
* tests/defs.in ($srcdir): Remove, define $testsrcdir directly.
* tests/Makefile.am ($(parallel_tests)): Generation of derived
tests updated.

ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/defs.in

index 28826f388c44ac39c494333c8faa6bf3d4486bad..2b41e2bd0b4e0fd8435124c7719ce580a5f22323 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-09-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Tests defs: $srcdir and $top_srcdir renaming.
+       * tests/defs.in ($srcdir): Remove, define $testsrcdir directly.
+       * tests/Makefile.am ($(parallel_tests)): Generation of derived
+       tests updated.
+
        Tests defs: new variable $top_testsrcdir.
        * tests/defs.in ($top_testsrcdir): Define unconditionally
        to @abs_top_srcdir@.  Use it throughout.
index d86b03b35315cccee8717ab466490692837a4925..f4fba45edc83a12afc39bf327070989c05a3d194 100644 (file)
@@ -34,10 +34,10 @@ $(parallel_tests): Makefile.am
        { echo '#!/bin/sh'; \
          echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
          echo; \
-         echo '# Ensure proper definition of $$srcdir.'; \
+         echo '# Ensure proper definition of $$testsrcdir.'; \
          echo 'am_skip_defs=yes'; \
          echo '. ./defs || exit 99'; \
-         echo 'test -n "$$srcdir" || exit 99 # sanity check'; \
+         echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
          echo; \
          echo "# Run the test with Automake's parallel-tests driver enabled."; \
          echo 'parallel_tests=yes'; \
@@ -46,7 +46,7 @@ $(parallel_tests): Makefile.am
          echo "if test -f \"./$$input\"; then"; \
          echo "  . \"./$$input\""; \
          echo 'else'; \
-         echo "  . \"\$$srcdir/$$input\""; \
+         echo "  . \"\$$testsrcdir/$$input\""; \
          echo 'fi'; \
        } > $@-t
        $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
index 77ec8886e82ac49d6058e3dfae66c04eea29f8f4..af80fdbe61590c228067eedc1fdcd96051b52246 100644 (file)
@@ -1408,10 +1408,10 @@ $(parallel_tests): Makefile.am
        { echo '#!/bin/sh'; \
          echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
          echo; \
-         echo '# Ensure proper definition of $$srcdir.'; \
+         echo '# Ensure proper definition of $$testsrcdir.'; \
          echo 'am_skip_defs=yes'; \
          echo '. ./defs || exit 99'; \
-         echo 'test -n "$$srcdir" || exit 99 # sanity check'; \
+         echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
          echo; \
          echo "# Run the test with Automake's parallel-tests driver enabled."; \
          echo 'parallel_tests=yes'; \
@@ -1420,7 +1420,7 @@ $(parallel_tests): Makefile.am
          echo "if test -f \"./$$input\"; then"; \
          echo "  . \"./$$input\""; \
          echo 'else'; \
-         echo "  . \"\$$srcdir/$$input\""; \
+         echo "  . \"\$$testsrcdir/$$input\""; \
          echo 'fi'; \
        } > $@-t
        $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
index 71796599e236d6d02bf5bd0f8598ed55d77d40b8..7f6807c97338276863a8dda64d920c25706fa861 100644 (file)
@@ -21,7 +21,7 @@
 # Tom Tromey <tromey@cygnus.com>
 
 # Absolutely necessary variable(s).
-srcdir='@abs_srcdir@'
+testsrcdir='@abs_srcdir@'
 top_testsrcdir='@abs_top_srcdir@'
 
 # Protect this file against multiple inclusion, useful for generated tests.
@@ -50,9 +50,9 @@ test -f ./defs || {
    exit 1
 }
 
-# Ensure $srcdir is set correctly.
-test -f "$srcdir/defs.in" || {
-   echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
+# Ensure $testsrcdir is set correctly.
+test -f "$testsrcdir/defs.in" || {
+   echo "$testsrcdir/defs.in not found, check \$testsrcdir" 1>&2
    exit 1
 }
 
@@ -312,6 +312,9 @@ unset DESTDIR
 unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
 unset htmldir includedir infodir libdir libexecdir localedir mandir
 unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
+# The tests call `make -e' but we do not want $srcdir from the environment
+# to override the definition from the Makefile.
+unset srcdir
 # Also unset variables that control our test driver.  While not
 # conceptually independent, they cause some changed semantics we
 # need to control (and test for) in some of the tests to ensure
@@ -361,7 +364,7 @@ case " $required " in
     # Libtool cannot cope with spaces in the build tree.  Our testsuite setup
     # cannot cope with spaces in the source tree name for Libtool and gettext
     # tests.
-    case $srcdir,`pwd` in
+    case $testsrcdir,`pwd` in
       *\ * | *\        *) Exit 77;;
     esac
     ACLOCAL="$ACLOCAL -Wno-syntax -I $top_testsrcdir/m4 $extra_includes -I $aclocaldir"
@@ -380,11 +383,6 @@ FGREP='@FGREP@'
 # and can be up to 3 seconds in the future w.r.t. the system clock.
 sleep='sleep @MODIFICATION_DELAY@'
 
-# The tests call `make -e' but we do not want $srcdir from the environment
-# to override the definition from the Makefile.
-testsrcdir=$srcdir
-unset srcdir
-
 # An old timestamp that can be given to a file, in "touch -t" format.
 # The time stamp should be portable to all file systems of interest.
 # Just for fun, choose the exact time of the announcement of the GNU project