]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Tests defs: avoid some useless subshells.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 12 Nov 2010 16:12:05 +0000 (17:12 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 7 Dec 2010 00:07:20 +0000 (01:07 +0100)
* tests/defs: In the loop on "$required" tools: avoid subshells
where not needed.

ChangeLog
tests/defs

index 7596418b015e0deba3bbb93d543a7f7c4019387d..480a9e672d55d997f2784ffdbc567a4081ecdccc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Tests defs: avoid some useless subshells.
+       * tests/defs: In the loop on "$required" tools: avoid subshells
+       where not needed.
+
 2010-11-16  Peter Rosin  <peda@lysator.liu.se>
 
        Skip MSVC oriented tests if the shell is not capable.
index 8f748b1c5ecbcea63e6b9d4d437f3f23ba781eb4..bb162552869734a3decb77116aab981d71031097 100644 (file)
@@ -149,18 +149,18 @@ do
       YACC='bison -y'
       export YACC
       echo "$me: running bison --version"
-      ( bison --version ) || exit 77
+      bison --version || exit 77
       ;;
     bzip2)
       # Do not use --version, bzip2 still tries to compress stdin.
       echo "$me: running bzip2 --help"
-      ( bzip2 --help ) || exit 77
+      bzip2 --help || exit 77
       ;;
     cl)
       CC=cl
       export CC
       echo "$me: running $CC -?"
-      ( $CC -? ) || exit 77
+      $CC -? || exit 77
       ;;
     etags)
       # Exuberant Ctags will create a TAGS file even
@@ -168,7 +168,7 @@ do
       # does not have such problem.)  Use -o /dev/null
       # to make sure we do not pollute the tests/ directory.
       echo "$me: running etags --version -o /dev/null"
-      ( etags --version -o /dev/null ) || exit 77
+      etags --version -o /dev/null || exit 77
       ;;
     GNUmake)
       # Use --version AND -v, because SGI Make doesn't fail on --version.
@@ -185,21 +185,21 @@ do
       CC=gcc
       export CC
       echo "$me: running $CC --version"
-      ( $CC --version ) || exit 77
+      $CC --version || exit 77
       ;;
     gcj)
       GCJ=gcj
       export GCJ
       echo "$me: running $GCJ --version"
-      ( $GCJ --version ) || exit 77
+      $GCJ --version || exit 77
       echo "$me: running $GCJ -v"
-      ( $GCJ -v ) || exit 77
+      $GCJ -v || exit 77
       ;;
     g++)
       CXX=g++
       export CXX
       echo "$me: running $CXX --version"
-      ( $CXX --version ) || exit 77
+      $CXX --version || exit 77
       ;;
     icc)
       CC=icc
@@ -209,16 +209,16 @@ do
       # it will try link *nothing* and complain it cannot find
       # main(); funny).  Use -help so it does not try linking anything.
       echo "$me: running $CC -V -help"
-      ( $CC -V -help ) || exit 77
+      $CC -V -help || exit 77
       ;;
     makedepend)
       echo "$me: running makedepend -f-"
-      ( makedepend -f- ) || exit 77
+      makedepend -f- || exit 77
       ;;
     makeinfo-html)
       # Make sure makeinfo understands --html.
       echo "$me: running makeinfo --html --version"
-      ( makeinfo --html --version ) || exit 77
+      makeinfo --html --version || exit 77
       ;;
     non-root)
       # Skip this test case if the user is root.
@@ -243,7 +243,7 @@ do
     python)
       # Python doesn't support --version, it has -V
       echo "$me: running python -V"
-      ( python -V ) || exit 77
+      python -V || exit 77
       ;;
     ro-dir)
       # Skip this test case if read-only directories aren't supported
@@ -275,7 +275,7 @@ do
       # the program on the runtest command-line. This requires
       # DejaGnu 1.4.3 or later.
       echo "$me: running runtest SOMEPROGRAM=someprogram --version"
-      (runtest SOMEPROGRAM=someprogram --version) || exit 77
+      runtest SOMEPROGRAM=someprogram --version || exit 77
       ;;
     tex)
       # No all versions of Tex support `--version', so we use
@@ -288,7 +288,7 @@ do
     texi2dvi-o)
       # Texi2dvi supports `-o' since Texinfo 4.1.
       echo "$me: running texi2dvi -o /dev/null --version"
-      ( texi2dvi -o /dev/null --version ) || exit 77
+      texi2dvi -o /dev/null --version || exit 77
       ;;
     xsi-shell)
       # Try some XSI features.
@@ -302,6 +302,9 @@ do
     *)
       # Generic case: the tool must support --version.
       echo "$me: running $tool --version"
+      # It is not likely but possible that $tool is a special builtin,
+      # in which case the shell is allowed to exit after an error.
+      # So, please leave the subshell here.
       ( $tool --version ) || exit 77
       ;;
   esac