]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Use `rm -f', not just `rm' when removing temporaries.
authorJim Meyering <meyering@lucent.com>
Sat, 4 Mar 2000 08:46:31 +0000 (08:46 +0000)
committerJim Meyering <meyering@lucent.com>
Sat, 4 Mar 2000 08:46:31 +0000 (08:46 +0000)
Preserve exit status in trap handler.
Based on suggestions from Paul Eggert.

autoheader.in
autoheader.sh
bin/autoheader.in

index 34db1b913990b89b2169d9c7da73cf5cff59a7ca..204fb4d0a8f452388ceda0e43f08a2cf7a3c71b3 100644 (file)
@@ -153,7 +153,8 @@ esac
 run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir"
 
 # Trap on 0 to stop playing with `rm'.
-$debug || trap "rm -f $ah_base*" 0 1 2 15
+$debug || trap 'ah_status=$?; rm -f $ah_base* && exit $ah_status' 0
+$debug || trap exit 1 2 13 15
 
 # Extract assignments of `ah_verbatim_SYMBOL' from the modified
 # autoconf processing of the input file.  The sed hair is necessary to
@@ -169,7 +170,7 @@ sed -n -e '
                b again
        }' $ah_base.exp >$ah_base.decls
 . $ah_base.decls
-$debug || rm $ah_base.exp $ah_base.decls
+$debug || rm -f $ah_base.exp $ah_base.decls
 
 # Make SYMS newline-separated rather than blank-separated, and remove dups.
 # Start each symbol with a blank (to match the blank after "#undef")
index 34db1b913990b89b2169d9c7da73cf5cff59a7ca..204fb4d0a8f452388ceda0e43f08a2cf7a3c71b3 100644 (file)
@@ -153,7 +153,8 @@ esac
 run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir"
 
 # Trap on 0 to stop playing with `rm'.
-$debug || trap "rm -f $ah_base*" 0 1 2 15
+$debug || trap 'ah_status=$?; rm -f $ah_base* && exit $ah_status' 0
+$debug || trap exit 1 2 13 15
 
 # Extract assignments of `ah_verbatim_SYMBOL' from the modified
 # autoconf processing of the input file.  The sed hair is necessary to
@@ -169,7 +170,7 @@ sed -n -e '
                b again
        }' $ah_base.exp >$ah_base.decls
 . $ah_base.decls
-$debug || rm $ah_base.exp $ah_base.decls
+$debug || rm -f $ah_base.exp $ah_base.decls
 
 # Make SYMS newline-separated rather than blank-separated, and remove dups.
 # Start each symbol with a blank (to match the blank after "#undef")
index 34db1b913990b89b2169d9c7da73cf5cff59a7ca..204fb4d0a8f452388ceda0e43f08a2cf7a3c71b3 100644 (file)
@@ -153,7 +153,8 @@ esac
 run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir"
 
 # Trap on 0 to stop playing with `rm'.
-$debug || trap "rm -f $ah_base*" 0 1 2 15
+$debug || trap 'ah_status=$?; rm -f $ah_base* && exit $ah_status' 0
+$debug || trap exit 1 2 13 15
 
 # Extract assignments of `ah_verbatim_SYMBOL' from the modified
 # autoconf processing of the input file.  The sed hair is necessary to
@@ -169,7 +170,7 @@ sed -n -e '
                b again
        }' $ah_base.exp >$ah_base.decls
 . $ah_base.decls
-$debug || rm $ah_base.exp $ah_base.decls
+$debug || rm -f $ah_base.exp $ah_base.decls
 
 # Make SYMS newline-separated rather than blank-separated, and remove dups.
 # Start each symbol with a blank (to match the blank after "#undef")