]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Tests defs: new variable $top_testsrcdir.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 2 Jun 2010 23:03:00 +0000 (01:03 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 5 Sep 2010 23:01:38 +0000 (01:01 +0200)
* tests/defs.in ($top_testsrcdir): Define unconditionally
to @abs_top_srcdir@.  Use it throughout.
* tests/ar-lib.test: Use `$top_testsrcdir' instead of
`$testsrcdir/..'.
* tests/auxdir.test: Likewise.
* tests/compile.test: Likewise.
* tests/compile2.test: Likewise.
* tests/compile3.test: Likewise.
* tests/compile5.test: Likewise.
* tests/mdate6.test: Likewise.
* tests/mkinst3.test: Likewise.
* tests/multlib.test: Likewise.
* tests/txinfo22.test: Likewise.

13 files changed:
ChangeLog
tests/ar-lib.test
tests/auxdir.test
tests/compile.test
tests/compile2.test
tests/compile3.test
tests/compile5.test
tests/defs.in
tests/mdate6.test
tests/mkinst3.test
tests/multlib.test
tests/obsolete.test
tests/txinfo22.test

index a42df97ac69bef78e8f0faf4c88f4216c02668ee..28826f388c44ac39c494333c8faa6bf3d4486bad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 2010-09-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Tests defs: new variable $top_testsrcdir.
+       * tests/defs.in ($top_testsrcdir): Define unconditionally
+       to @abs_top_srcdir@.  Use it throughout.
+       * tests/ar-lib.test: Use `$top_testsrcdir' instead of
+       `$testsrcdir/..'.
+       * tests/auxdir.test: Likewise.
+       * tests/compile.test: Likewise.
+       * tests/compile2.test: Likewise.
+       * tests/compile3.test: Likewise.
+       * tests/compile5.test: Likewise.
+       * tests/mdate6.test: Likewise.
+       * tests/mkinst3.test: Likewise.
+       * tests/multlib.test: Likewise.
+       * tests/txinfo22.test: Likewise.
+
        Tests defs: $srcdir is unconditionally substituted.
        * tests/defs.in ($srcdir): Define unconditionally to @abs_srcdir@.
        Remove code for $srcdir normalization, which is now useless.
index d418c21ed51c30c9b903937e08b635501abadd74..d3f5f01fde237ad3da89a577ee78b95dea740a56 100755 (executable)
@@ -20,7 +20,8 @@
 
 set -e
 
-cp "$testsrcdir/../lib/ar-lib" .
+cp "$top_testsrcdir/lib/ar-lib" .
+
 # Use a dummy lib, since lib isn't readily available on all systems
 cat >lib <<'END'
 #! /bin/sh
index 95a7a20d970dbcab3e79c858decff67e7eb46d56..74f6e6c594406a9d695e729b30c06f1a49fa3257 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2004, 2007  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2004, 2007, 2010 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
@@ -30,7 +31,7 @@ cat > Makefile.am << 'END'
 pkgdata_DATA =
 END
 
-cp "$testsrcdir/../lib/mkinstalldirs" .
+cp "$top_testsrcdir/lib/mkinstalldirs" .
 
 # The "././" prefix confuses Automake into thinking it is doing a
 # subdir build.  Yes, this is hacky.
index ef27afea0127466033f61f4c658e4cae0a780d20..616286152754665abc5f33222c6da2ae403490b0 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 2010 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
@@ -20,7 +20,7 @@
 
 set -e
 
-cp "$testsrcdir/../lib/compile" .
+cp "$top_testsrcdir/lib/compile" .
 
 # -o 'a  c' should not be stripped because 'a  c' is not an object
 # (it does not matter whether touch creates ./-- or not)
index fe4574a964113fde82b9092ec911985cbd705f39..e3069d0fadb62bd8ef9bf66b9a9be46ae1f2589c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
@@ -20,7 +20,7 @@
 
 set -e
 
-cp "$testsrcdir/../lib/compile" .
+cp "$top_testsrcdir/lib/compile" .
 
 cat >mycc <<'END'
 source_seen=no
index b77237b9392244b65a60543ff97a0f4c513f10b5..e7b8b6dc542edc46bb42b8920d8f9a775727a132 100755 (executable)
@@ -20,7 +20,7 @@
 
 set -e
 
-cp "$testsrcdir/../lib/compile" .
+cp "$top_testsrcdir/lib/compile" .
 
 # Use a dummy cl, since cl isn't readily available on all systems
 cat >cl <<'END'
index cd1468fa76caf0cad2a938ab85b1d90da53a2bfd..5fc1b30310709f2f62dbf7abe00b357bcd350bf1 100755 (executable)
@@ -21,7 +21,7 @@
 
 set -e
 
-cp "$testsrcdir/../lib/compile" .
+cp "$top_testsrcdir/lib/compile" .
 
 # Use a dummy cl, since cl isn't readily available on all systems
 cat >cl <<'END'
index 109c458a5822f3c9c7b328e0aa5dc334f72bdde9..71796599e236d6d02bf5bd0f8598ed55d77d40b8 100644 (file)
@@ -22,6 +22,7 @@
 
 # Absolutely necessary variable(s).
 srcdir='@abs_srcdir@'
+top_testsrcdir='@abs_top_srcdir@'
 
 # Protect this file against multiple inclusion, useful for generated tests.
 if test x"$am_skip_defs" = xyes; then
@@ -66,7 +67,7 @@ test -z "$MAKE" && MAKE=make
 test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
 test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
 test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
-test -z "$MISSING" && MISSING=`pwd`/../lib/missing
+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.)
 test -z "$ACLOCAL" && ACLOCAL="aclocal-@APIVERSION@ -Werror"
@@ -278,7 +279,7 @@ signal=0
 
 # Copy in some files we need.
 for file in install-sh missing depcomp; do
-   cp "$srcdir/../lib/$file" "$testSubDir/$file" || Exit 1
+   cp "$top_testsrcdir/lib/$file" "$testSubDir/$file" || Exit 1
 done
 
 cd ./$testSubDir
@@ -326,9 +327,9 @@ echo "=== Running test $0"
 
 # We might need extra macros, e.g., from Libtool or Gettext.
 # Find them on the system.
-# Use `-I $srcdir/../m4' in addition to `--acdir=$srcdir/../m4', because the
-# other `-I' directories added for libtool and gettext might contain
-# files from an old version of Automake that we don't want to use.
+# Use `-I $top_testsrcdir/m4' in addition to `--acdir=$top_testsrcdir/m4',
+# because the other `-I' directories added for libtool and gettext might
+# contain files from an old version of Automake that we don't want to use.
 # Use `-Wno-syntax' because we do not want our test suite to fail because
 # some third-party .m4 file is underquoted.
 case " $required " in
@@ -363,11 +364,11 @@ case " $required " in
     case $srcdir,`pwd` in
       *\ * | *\        *) Exit 77;;
     esac
-    ACLOCAL="$ACLOCAL -Wno-syntax -I $srcdir/../m4 $extra_includes -I $aclocaldir"
+    ACLOCAL="$ACLOCAL -Wno-syntax -I $top_testsrcdir/m4 $extra_includes -I $aclocaldir"
     ;;
 esac
 
-testaclocaldir='@abs_top_srcdir@/m4'
+testaclocaldir=$top_testsrcdir/m4
 
 # POSIX no longer requires 'egrep' and 'fgrep',
 # but some hosts lack 'grep -E' and 'grep -F'.
index e7f7d69caa06758b274af656e260258bc94ceaf6..cb2456c0bf01c60285d81b7396920b431411c583 100755 (executable)
@@ -24,7 +24,7 @@ a=
 file='file  name $a'
 ( : > "$file" ) || Exit 77
 
-cp "$testsrcdir"/../lib/mdate-sh .
+cp "$top_testsrcdir/lib/mdate-sh" .
 $SHELL ./mdate-sh "$file" >stdout 2>stderr ||
   { cat stdout; cat stderr >&2; Exit 1; }
 cat stdout
index 18f18fb9ab87e853c2fc27ee1f4ae8c3a5e9d16d..6ccabf92ecd1ff52158aa0cd723e9d5f69854854 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2010 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
@@ -25,7 +25,7 @@ mkdir '~a b' || Exit 77
 mkdir '~a b/-x  y' || Exit 77
 rm -rf '~a b'
 
-cp "$testsrcdir/../lib/mkinstalldirs" .
+cp "$top_testsrcdir/lib/mkinstalldirs" .
 
 # Test mkinstalldirs with the installed mkdir.
 
index 5ff19d71b742e8034103ebe6a84acf40290636a9..73e9b3790a13edf35425bbe26c75ae73643bf1f4 100755 (executable)
@@ -107,8 +107,8 @@ mkdir libbar/sub
 
 : > libbar/bar.c
 
-cp "$testsrcdir/../lib/config-ml.in" .
-cp "$testsrcdir/../lib/symlink-tree" .
+cp "$top_testsrcdir/lib/config-ml.in" .
+cp "$top_testsrcdir/lib/symlink-tree" .
 
 $ACLOCAL
 $AUTOCONF
index 337e4db25e881da10bfe7d68713d38b326c21e04..588fc0d8ebae1f7bb7c0a4c24db20d5de05145a8 100755 (executable)
@@ -28,7 +28,7 @@ AC_INIT
 END
 
 $PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
-    "$testsrcdir/../m4/obsolete.m4" >> obs
+    "$top_testsrcdir/m4/obsolete.m4" >> obs
 cat obs >> configure.in
 $PERL -ne 'chomp; print "grep $_ stderr || Exit 1\n"; ' obs > obs.1
 $PERL -ne 'chomp; print "grep $_ configure.in && Exit 1\n"; ' obs > obs.2
index 3c2265da04b9f6dfea31834b3a2640b97149ea37..4adf47379d8a52458cb30e45bac73740d52b77b9 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2008, 2010 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
@@ -56,7 +57,7 @@ END
 
 mkdir aux1
 mkdir tex
-cp "$testsrcdir/../lib/texinfo.tex" tex
+cp "$top_testsrcdir/lib/texinfo.tex" tex
 
 $ACLOCAL
 $AUTOMAKE --add-missing