]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* config/ltmain.m4sh, m4/libtool.m4: Change `( cmd ) 2>/dev/null' to
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 31 Jan 2005 16:17:06 +0000 (16:17 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 31 Jan 2005 16:17:06 +0000 (16:17 +0000)
`{ cmd; } 2>/dev/null', when cmd has no side effects and might be a
builtin.  Note that it is unspecified whether cmd will run within a
subshell (e.g. Bourne shells) or within the current shell (most modern
shells).

ChangeLog
config/ltmain.m4sh
m4/libtool.m4

index 4603d8db33a1879b0987bf462ad1260b3ed5729c..b0a4eaf2266a71d086de1754cedee63e14e84def 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * config/ltmain.m4sh, m4/libtool.m4: Change `( cmd ) 2>/dev/null' to
+       `{ cmd; } 2>/dev/null', when cmd has no side effects and might be a
+       builtin.  Note that it is unspecified whether cmd will run within a
+       subshell (e.g. Bourne shells) or within the current shell (most modern
+       shells).
+
 2005-01-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG) [linux]:
index 64d77ccd9dae17196921919b96b3c41b571bd763..9e3f1e0f1096bace4b0bf4d6aad89eb676ffac51 100644 (file)
@@ -88,7 +88,7 @@ if test "X$1" = X--no-reexec; then
 elif test "X$1" = X--fallback-echo; then
   # Avoid inline document here, it may be left over
   :
-elif test "X`($ECHO '\t') 2>/dev/null`" = 'X\t'; then
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
   # Yippee, $ECHO works!
   :
 else
@@ -6092,7 +6092,7 @@ else
     if test \"X\$1\" = X--no-reexec; then
       # Discard the --no-reexec flag, and continue.
       shift
-    elif test \"X\`(\$ECHO '\t') 2>/dev/null\`\" = 'X\t'; then
+    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
       # Yippee, \$ECHO works!
       :
     else
@@ -6564,8 +6564,8 @@ func_mode_uninstall ()
       fi
 
       # Don't error if the file doesn't exist and rm -f was used.
-      if (test -L "$file") >/dev/null 2>&1 ||
-        (test -h "$file") >/dev/null 2>&1 ||
+      if { test -L "$file"; } >/dev/null 2>&1 ||
+        { test -h "$file"; } >/dev/null 2>&1 ||
         test -f "$file"; then
        :
       elif test -d "$file"; then
index 6a21cfda3d1802fd1cc52ca7ed6b70478fa85a1d..2cfb52353fe954538152352e96303bcd4f7f1a68 100644 (file)
@@ -728,7 +728,7 @@ if test "X[$]1" = X--no-reexec; then
 elif test "X[$]1" = X--fallback-echo; then
   # Avoid inline document here, it may be left over
   :
-elif test "X`($ECHO '\t') 2>/dev/null`" = 'X\t' ; then
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
   # Yippee, $ECHO works!
   :
 else
@@ -754,17 +754,16 @@ if test -z "$lt_ECHO"; then
     # find a string as large as possible, as long as the shell can cope with it
     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
       # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if (echo_test_string="`eval $cmd`") 2>/dev/null &&
-         echo_test_string="`eval $cmd`" &&
-         (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+      if { echo_test_string="`eval $cmd`"; } 2>/dev/null &&
+        { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
       then
         break
       fi
     done
   fi
 
-  if test "X`($ECHO '\t') 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`($ECHO "$echo_test_string") 2>/dev/null` &&
+  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
      test "X$echo_testing_string" = "X$echo_test_string"; then
     :
   else
@@ -789,12 +788,12 @@ if test -z "$lt_ECHO"; then
 
     if test "X$ECHO" = Xecho; then
       # We didn't find a better echo, so look for alternatives.
-      if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
          test "X$echo_testing_string" = "X$echo_test_string"; then
         # This shell has a builtin print -r that does the trick.
         ECHO='print -r'
-      elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
           test "X$CONFIG_SHELL" != X/bin/ksh; then
         # If we have ksh, try running configure again with it.
         ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
@@ -805,8 +804,8 @@ if test -z "$lt_ECHO"; then
       else
         # Try using printf.
         ECHO='printf %s\n'
-        if test "X`($ECHO '\t') 2>/dev/null`" = 'X\t' &&
-          echo_testing_string=`($ECHO "$echo_test_string") 2>/dev/null` &&
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+          echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
           test "X$echo_testing_string" = "X$echo_test_string"; then
          # Cool, printf works
          :
@@ -829,7 +828,7 @@ if test -z "$lt_ECHO"; then
          prev=:
 
          for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+           if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
            then
              break
            fi
@@ -1191,8 +1190,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     # If test is not a shell built-in, we'll probably end up computing a
     # maximum length that is only half of the actual maximum length, but
     # we can't tell.
-    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-              = "XX$teststring$teststring") >/dev/null 2>&1 &&
+    while test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+              = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
            test $i != 17 # 1/2 MB should be enough
     do
       i=`expr $i + 1`