Tests defs: prefer "$curdir" over "`pwd`".
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 5 Nov 2010 16:20:55 +0000 (17:20 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 10 Nov 2010 22:58:56 +0000 (23:58 +0100)
* tests/defs.in: We already save the value of `pwd` in $curdir
early in the file, so there no need to recalculate it later, when
the current working directory is not changed.

ChangeLog
tests/defs.in

index 6c17916..9101b5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-11-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Tests defs: prefer "$curdir" over "`pwd`".
+       * tests/defs.in: We already save the value of `pwd` in $curdir
+       early in the file, so there no need to recalculate it later, when
+       the current working directory is not changed.
+
        Tests defs: use `$me' in more error messages.
        * tests/defs.in: Also use `$me' in error messages referring to
        missing `defs' or `defs.in', since that variable is now defined
index 9ce76c4..700365d 100644 (file)
@@ -105,7 +105,7 @@ old_timestamp=198309271735.59
 curdir=`pwd`
 
 # Make our wrapper scripts accessible by default.
-PATH="`pwd`$PATH_SEPARATOR$PATH"; export PATH
+PATH="$curdir$PATH_SEPARATOR$PATH"; export PATH
 
 
 ## -------------------------------------------------------- ##
@@ -395,10 +395,10 @@ case " $required " in
     esac
     # 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.  Using just "`pwd`" for the check here is ok, since the further
+    # tests.  Using just `$curdir' for the check here is ok, since the further
     # temporary subdirectory where the test will be run is ensured not to
     # contain any space.
-    case $testsrcdir,`pwd` in
+    case $testsrcdir,$curdir in
       *\ * | *\        *) exit 77;;
     esac
     ACLOCAL="$ACLOCAL -Wno-syntax -I $top_testsrcdir/m4 $extra_includes -I $aclocaldir"