]> gcc.gnu.org Git - gcc.git/commitdiff
mkconfig.sh: Use a subshell with redirected stdout...
authorZack Weinberg <zackw@stanford.edu>
Fri, 23 Mar 2001 01:16:22 +0000 (01:16 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Fri, 23 Mar 2001 01:16:22 +0000 (01:16 +0000)
* mkconfig.sh: Use a subshell with redirected stdout,
instead of closing stdout and confusing commands that run
afterward.  Throw away output of cmp.

From-SVN: r40765

gcc/ChangeLog
gcc/mkconfig.sh

index c94dacc5994401a3d5f7aca040b9d45cb388545f..07dcc2f4b513e3f9c475e1add610ead9380130b2 100644 (file)
@@ -1,3 +1,9 @@
+2001-03-22  Zack Weinberg  <zackw@stanford.edu>
+
+       * mkconfig.sh: Use a subshell with redirected stdout,
+       instead of closing stdout and confusing commands that run
+       afterward.  Throw away output of cmp.
+
 2001-03-22  Gordon Sadler  <gbsadler1@lcisp.com>
 
        * Makefile.in (stage1_build): Pass CFLAGS to stage1_build.
index e89d382e002abb02b6fc712345818677925b0ba1..5250708fcecdd96293730f42ba04a9e18aeadec2 100644 (file)
@@ -12,7 +12,10 @@ fi
 
 output=$1
 rm -f $output.T
-exec > $output.T
+
+# We used to exec > $output.T but apparently this has bugs.
+# Use a redirected subshell instead.
+(
 
 # Define TARGET_CPU_DEFAULT if the system wants one.
 # This substitutes for lots of *.h files.
@@ -53,10 +56,10 @@ echo "#include \"insn-codes.h\""
 echo "#include \"insn-flags.h\""
 echo "#endif"
 
-exec >&-
+) > $output.T
 
 # Avoid changing the actual file if possible.
-if [ -f $output ] && cmp $output.T $output; then
+if [ -f $output ] && cmp $output.T $output >/dev/null 2>&1; then
     echo $output is unchanged >&2
     rm -f $output.T
 else
This page took 0.077129 seconds and 5 git commands to generate.