From: Akim Demaille Date: Thu, 10 Feb 2000 13:12:04 +0000 (+0000) Subject: Interrupting autoheader left temp files. X-Git-Tag: autoconf-2.50~1152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9628b9e93dfdfcb4dd907ce2196d8564ee88d36;p=thirdparty%2Fautoconf.git Interrupting autoheader left temp files. From Jim Meyering. * autoheader.sh (usage): The usage is to use $0 here. (ah_base): Be in TMPDIR. Install the `trap' before creating the first tmp file. Also trap on 0. --- diff --git a/ChangeLog b/ChangeLog index 69ffac994..285f9a682 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-02-10 Akim Demaille + + Interrupting autoheader left temp files. + From Jim Meyering. + + * autoheader.sh (usage): The usage is to use $0 here. + (ah_base): Be in TMPDIR. + Install the `trap' before creating the first tmp file. + Also trap on 0. + 2000-02-10 Akim Demaille * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): This is a routine of diff --git a/autoheader.in b/autoheader.in index 70bbefc11..28babfca3 100644 --- a/autoheader.in +++ b/autoheader.in @@ -1,6 +1,6 @@ #! @SHELL@ # autoheader -- create `config.h.in' from `configure.in' -# Copyright (C) 1992-1994, 1996, 1998-1999 Free Software Foundation, Inc. +# Copyright (C) 1992-94, 96, 98, 99, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: autoheader [OPTION] ... [TEMPLATE-FILE] +Usage: $0 [OPTION] ... [TEMPLATE-FILE] Create a template file of C \`#define' statements for \`configure' to use. To this end, scan TEMPLATE-FILE, or \`configure.in' if none @@ -45,7 +45,7 @@ version="\ autoheader (GNU @PACKAGE@) @VERSION@ Written by Roland McGrath. -Copyright (C) 1992-1994, 1996, 1998-1999 Free Software Foundation, Inc. +Copyright (C) 1992-94, 96, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -82,7 +82,9 @@ ac_LF_and_DOT=`echo; echo .` localdir=. debug=false # Basename for temporary files. -ah_base=ah$$ +: ${TMPDIR=/tmp} +ah_base=$TMPDIR/ah$$ +tmpout=$ah_base.out while test $# -gt 0 ; do case "$1" in @@ -150,6 +152,9 @@ case `$M4 --help < /dev/null 2>&1` in 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 + # Extract assignments of `ah_verbatim_SYMBOL' from the modified # autoconf processing of the input file. The sed hair is necessary to # win for multi-line macro invocations. @@ -163,7 +168,7 @@ sed -n -e ' s/^/@@@/ b again }' $ah_base.exp >$ah_base.decls -. ./$ah_base.decls +. $ah_base.decls $debug || rm $ah_base.exp $ah_base.decls # Make SYMS newline-separated rather than blank-separated, and remove dups. @@ -224,7 +229,6 @@ if test -n "$syms"; then # pattern on the command line, so use a temporary file containing the # pattern. (fgrep_tmp=$ah_base.fgrep - trap "rm -f $fgrep_tmp; exit 1" 1 2 15 cat > $fgrep_tmp <&1` in 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 + # Extract assignments of `ah_verbatim_SYMBOL' from the modified # autoconf processing of the input file. The sed hair is necessary to # win for multi-line macro invocations. @@ -163,7 +168,7 @@ sed -n -e ' s/^/@@@/ b again }' $ah_base.exp >$ah_base.decls -. ./$ah_base.decls +. $ah_base.decls $debug || rm $ah_base.exp $ah_base.decls # Make SYMS newline-separated rather than blank-separated, and remove dups. @@ -224,7 +229,6 @@ if test -n "$syms"; then # pattern on the command line, so use a temporary file containing the # pattern. (fgrep_tmp=$ah_base.fgrep - trap "rm -f $fgrep_tmp; exit 1" 1 2 15 cat > $fgrep_tmp <&1` in 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 + # Extract assignments of `ah_verbatim_SYMBOL' from the modified # autoconf processing of the input file. The sed hair is necessary to # win for multi-line macro invocations. @@ -163,7 +168,7 @@ sed -n -e ' s/^/@@@/ b again }' $ah_base.exp >$ah_base.decls -. ./$ah_base.decls +. $ah_base.decls $debug || rm $ah_base.exp $ah_base.decls # Make SYMS newline-separated rather than blank-separated, and remove dups. @@ -224,7 +229,6 @@ if test -n "$syms"; then # pattern on the command line, so use a temporary file containing the # pattern. (fgrep_tmp=$ah_base.fgrep - trap "rm -f $fgrep_tmp; exit 1" 1 2 15 cat > $fgrep_tmp <. .SH COPYRIGHT -Copyright \(co 1992-1994, 1996, 1998-1999 Free Software Foundation, Inc. +Copyright \(co 1992-94, 96, 98, 99, 2000 Free Software Foundation, Inc. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/man/autoreconf.1 b/man/autoreconf.1 index 0947631f1..4cc9d588e 100644 --- a/man/autoreconf.1 +++ b/man/autoreconf.1 @@ -1,4 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.019. +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.020. .TH AUTORECONF "1" "February 2000" "GNU autoconf 2.14a" FSF .SH NAME autoreconf \- Update generated configuration files diff --git a/man/autoupdate.1 b/man/autoupdate.1 index 8b8b3ebcf..6b7c36349 100644 --- a/man/autoupdate.1 +++ b/man/autoupdate.1 @@ -1,4 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.019. +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.020. .TH AUTOUPDATE "1" "February 2000" "GNU autoconf 2.14a" FSF .SH NAME autoupdate \- Update a configure.in to a newer Autoconf diff --git a/man/ifnames.1 b/man/ifnames.1 index d8b712c74..d6d44f3fd 100644 --- a/man/ifnames.1 +++ b/man/ifnames.1 @@ -1,4 +1,4 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.019. +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.020. .TH IFNAMES "1" "February 2000" "GNU autoconf 2.14a" FSF .SH NAME ifnames \- Extract CPP conditionals from a set of files