From: Jim Meyering Date: Sat, 4 Mar 2000 08:46:31 +0000 (+0000) Subject: Use `rm -f', not just `rm' when removing temporaries. X-Git-Tag: autoconf-2.50~1093 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f590fb62492dd3a12b9b5fe79e45ab295ac2f99e;p=thirdparty%2Fautoconf.git Use `rm -f', not just `rm' when removing temporaries. Preserve exit status in trap handler. Based on suggestions from Paul Eggert. --- diff --git a/autoheader.in b/autoheader.in index 34db1b913..204fb4d0a 100644 --- a/autoheader.in +++ b/autoheader.in @@ -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") diff --git a/autoheader.sh b/autoheader.sh index 34db1b913..204fb4d0a 100644 --- a/autoheader.sh +++ b/autoheader.sh @@ -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") diff --git a/bin/autoheader.in b/bin/autoheader.in index 34db1b913..204fb4d0a 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -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")