]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* autoheader.sh: Fix trap (EXIT) status.
authorAkim Demaille <akim@epita.fr>
Wed, 27 Sep 2000 10:02:27 +0000 (10:02 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 27 Sep 2000 10:02:27 +0000 (10:02 +0000)
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* autoconf.sh: Change `exit' to `{ (exit 1); exit; }' after m4 and
awk commands to ensure exit state is in a defined state.

ChangeLog
autoconf.in
autoconf.sh
autoheader.in
autoheader.sh
autoreconf.in
autoreconf.sh
bin/autoconf.in
bin/autoheader.in
bin/autoreconf.in

index 9c3432110d56e177000bf81c7f12ae18f0b55674..fec69e28571b19d7d821a8218cba5c2771af768e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-09-27  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * autoheader.sh: Fix trap (EXIT) status.
+       * autoreconf.sh: Likewise.
+       * autoupdate.sh: Likewise.
+       * autoconf.sh: Change `exit' to `{ (exit 1); exit; }' after m4 and
+       awk commands to ensure exit state is in a defined state.
+
 2000-09-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
 
        * tests/semantics.m4 (AC_PROG_CPP with warning): Simplified.
index 2b56600c8278cb0a68f85fc6ba4cefeb1494d039..78e9804b9d7e8cc5927bb0c086a98ec152d5adc0 100644 (file)
@@ -299,7 +299,8 @@ case $task in
   ## --------------------------------- ##
   script)
   # M4 expansion.
-  $run_m4f -D_AC_WARNINGS=$_ac_warnings $infile >$tmp/configure || exit
+  $run_m4f -D_AC_WARNINGS=$_ac_warnings $infile >$tmp/configure ||
+    { (exit 1); exit; }
 
   # You can add your own prefixes to pattern if you want to check for
   # them too.
@@ -554,7 +555,8 @@ EOF
   do
     # The request may be several lines long, hence sed has to quit.
     trace_opt="$trace_opt -t "`echo "$trace" | sed -e 's/:.*//;q'`
-    echo "$trace" | $AWK -f $tmp/translate.awk >>$tmp/trace.m4 || exit
+    echo "$trace" | $AWK -f $tmp/translate.awk >>$tmp/trace.m4 ||
+      { (exit 1); exit; }
   done
   echo "divert(0)dnl" >>$tmp/trace.m4
 
index 2b56600c8278cb0a68f85fc6ba4cefeb1494d039..78e9804b9d7e8cc5927bb0c086a98ec152d5adc0 100644 (file)
@@ -299,7 +299,8 @@ case $task in
   ## --------------------------------- ##
   script)
   # M4 expansion.
-  $run_m4f -D_AC_WARNINGS=$_ac_warnings $infile >$tmp/configure || exit
+  $run_m4f -D_AC_WARNINGS=$_ac_warnings $infile >$tmp/configure ||
+    { (exit 1); exit; }
 
   # You can add your own prefixes to pattern if you want to check for
   # them too.
@@ -554,7 +555,8 @@ EOF
   do
     # The request may be several lines long, hence sed has to quit.
     trace_opt="$trace_opt -t "`echo "$trace" | sed -e 's/:.*//;q'`
-    echo "$trace" | $AWK -f $tmp/translate.awk >>$tmp/trace.m4 || exit
+    echo "$trace" | $AWK -f $tmp/translate.awk >>$tmp/trace.m4 ||
+      { (exit 1); exit; }
   done
   echo "divert(0)dnl" >>$tmp/trace.m4
 
index 1dd9b0ce87afad72183ff57e735b3f8ae25c6e12..d7eb14dde114ad6a2b3448fe4ac0a95282c19a92 100644 (file)
@@ -88,6 +88,7 @@ for autoconf in "$AUTOCONF" \
 done
 debug=false
 localdir=.
+status=0
 tmp=
 verbose=:
 warning_all=false
@@ -179,7 +180,7 @@ done
 $debug ||
 {
   trap 'status=$?; rm -rf $tmp && exit $status' 0
-  trap 'exit $?' 1 2 13 15
+  trap '(exit $?); exit' 1 2 13 15
 }
 
 # Create a (secure) tmp directory for tmp files.
@@ -194,7 +195,7 @@ $debug ||
 } ||
 {
    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   exit 1;
+   (exit 1); exit
 }
 
 # Preach.
@@ -217,7 +218,7 @@ if ($warning_all || $warning_obsolete) &&
     More sophisticated templates can also be produced, see the
     documentation.
 EOF
-  $warning_error && exit 1
+  $warning_error && { (exit 1); exit; }
 fi
 
 acconfigs=
@@ -230,7 +231,7 @@ case $# in
   *) exec >&2
      echo "$me: invalid number of arguments."
      echo "$help"
-     exit 1 ;;
+     (exit 1); exit ;;
 esac
 
 # Set up autoconf.
@@ -249,7 +250,7 @@ $autoconf  \
 $2"' \
   --trace AC_DEFINE:'syms="$$syms $1"' \
   --trace AC_DEFINE_UNQUOTED:'syms="$$syms $1"' \
-  $infile >$tmp/traces.sh || exit 1
+  $infile >$tmp/traces.sh || { (exit 1); exit; }
 
 $verbose $me: sourcing $tmp/traces.sh >&2
 . $tmp/traces.sh
@@ -271,7 +272,8 @@ syms=`for sym in $syms; do echo $sym; done |
 config_h=`echo "$config_h" | sed -e 's/ .*//'`
 # Support "outfile[:infile]", defaulting infile="outfile.in".
 case "$config_h" in
-"") echo "$me: error: AC_CONFIG_HEADERS not found in $infile" >&2; exit 1 ;;
+"") echo "$me: error: AC_CONFIG_HEADERS not found in $infile" >&2
+    (exit 1); exit ;;
 *:*) config_h_in=`echo "$config_h" | sed 's/.*://'`
      config_h=`echo "$config_h" | sed 's/:.*//'` ;;
 *) config_h_in="$config_h.in" ;;
@@ -305,7 +307,6 @@ test -f $config_h.bot && cat $config_h.bot >>$tmp/config.hin
 
 # Check that all the symbols have a template.
 $verbose $me: checking completeness of the template >&2
-status=0
 # Regexp for a white space.
 w='[   ]'
 if test -n "$syms"; then
@@ -336,4 +337,4 @@ if test $status = 0; then
   fi
 fi
 
-exit $status
+(exit $status); exit
index 1dd9b0ce87afad72183ff57e735b3f8ae25c6e12..d7eb14dde114ad6a2b3448fe4ac0a95282c19a92 100644 (file)
@@ -88,6 +88,7 @@ for autoconf in "$AUTOCONF" \
 done
 debug=false
 localdir=.
+status=0
 tmp=
 verbose=:
 warning_all=false
@@ -179,7 +180,7 @@ done
 $debug ||
 {
   trap 'status=$?; rm -rf $tmp && exit $status' 0
-  trap 'exit $?' 1 2 13 15
+  trap '(exit $?); exit' 1 2 13 15
 }
 
 # Create a (secure) tmp directory for tmp files.
@@ -194,7 +195,7 @@ $debug ||
 } ||
 {
    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   exit 1;
+   (exit 1); exit
 }
 
 # Preach.
@@ -217,7 +218,7 @@ if ($warning_all || $warning_obsolete) &&
     More sophisticated templates can also be produced, see the
     documentation.
 EOF
-  $warning_error && exit 1
+  $warning_error && { (exit 1); exit; }
 fi
 
 acconfigs=
@@ -230,7 +231,7 @@ case $# in
   *) exec >&2
      echo "$me: invalid number of arguments."
      echo "$help"
-     exit 1 ;;
+     (exit 1); exit ;;
 esac
 
 # Set up autoconf.
@@ -249,7 +250,7 @@ $autoconf  \
 $2"' \
   --trace AC_DEFINE:'syms="$$syms $1"' \
   --trace AC_DEFINE_UNQUOTED:'syms="$$syms $1"' \
-  $infile >$tmp/traces.sh || exit 1
+  $infile >$tmp/traces.sh || { (exit 1); exit; }
 
 $verbose $me: sourcing $tmp/traces.sh >&2
 . $tmp/traces.sh
@@ -271,7 +272,8 @@ syms=`for sym in $syms; do echo $sym; done |
 config_h=`echo "$config_h" | sed -e 's/ .*//'`
 # Support "outfile[:infile]", defaulting infile="outfile.in".
 case "$config_h" in
-"") echo "$me: error: AC_CONFIG_HEADERS not found in $infile" >&2; exit 1 ;;
+"") echo "$me: error: AC_CONFIG_HEADERS not found in $infile" >&2
+    (exit 1); exit ;;
 *:*) config_h_in=`echo "$config_h" | sed 's/.*://'`
      config_h=`echo "$config_h" | sed 's/:.*//'` ;;
 *) config_h_in="$config_h.in" ;;
@@ -305,7 +307,6 @@ test -f $config_h.bot && cat $config_h.bot >>$tmp/config.hin
 
 # Check that all the symbols have a template.
 $verbose $me: checking completeness of the template >&2
-status=0
 # Regexp for a white space.
 w='[   ]'
 if test -n "$syms"; then
@@ -336,4 +337,4 @@ if test $status = 0; then
   fi
 fi
 
-exit $status
+(exit $status); exit
index adffd6ba45f2605e0be22c167062e30a70ba2dea..09ce386a55271708eb14a2c939c98d26b5495a69 100644 (file)
@@ -100,6 +100,7 @@ install=false
 localdir=.
 # m4dir -- local Autoconf extensions.  Typically `m4'.
 m4dir=
+status=0
 # symlink -- when --install, use symlinks instead.
 symlink=false
 verbose=:
@@ -241,7 +242,7 @@ fi
 $debug ||
 {
   trap 'status=$?; rm -rf $tmp && exit $status' 0
-  trap 'exit $?' 1 2 13 15
+  trap '(exit $?); exit' 1 2 13 15
 }
 
 # Create a (secure) tmp directory for tmp files.
@@ -256,7 +257,7 @@ $debug ||
 } ||
 {
    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   exit 1;
+   (exit 1); exit
 }
 
 # When debugging, it is convenient that all the related temporary
@@ -275,7 +276,7 @@ cat >$tmp/alflags.sed <<EOF
 EOF
 
 # update.sh --
-# Exit 0 iff the first argument is not the most recent of all or is missing.
+# Exit 0 if the first argument is not the most recent of all or is missing.
 cat >$tmp/update.sh <<\EOF
 test -f "$1" || exit 0
 test x`ls -1dt "$@" 2>/dev/null | sed 1q` != x"$1"
index adffd6ba45f2605e0be22c167062e30a70ba2dea..09ce386a55271708eb14a2c939c98d26b5495a69 100644 (file)
@@ -100,6 +100,7 @@ install=false
 localdir=.
 # m4dir -- local Autoconf extensions.  Typically `m4'.
 m4dir=
+status=0
 # symlink -- when --install, use symlinks instead.
 symlink=false
 verbose=:
@@ -241,7 +242,7 @@ fi
 $debug ||
 {
   trap 'status=$?; rm -rf $tmp && exit $status' 0
-  trap 'exit $?' 1 2 13 15
+  trap '(exit $?); exit' 1 2 13 15
 }
 
 # Create a (secure) tmp directory for tmp files.
@@ -256,7 +257,7 @@ $debug ||
 } ||
 {
    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   exit 1;
+   (exit 1); exit
 }
 
 # When debugging, it is convenient that all the related temporary
@@ -275,7 +276,7 @@ cat >$tmp/alflags.sed <<EOF
 EOF
 
 # update.sh --
-# Exit 0 iff the first argument is not the most recent of all or is missing.
+# Exit 0 if the first argument is not the most recent of all or is missing.
 cat >$tmp/update.sh <<\EOF
 test -f "$1" || exit 0
 test x`ls -1dt "$@" 2>/dev/null | sed 1q` != x"$1"
index 2b56600c8278cb0a68f85fc6ba4cefeb1494d039..78e9804b9d7e8cc5927bb0c086a98ec152d5adc0 100644 (file)
@@ -299,7 +299,8 @@ case $task in
   ## --------------------------------- ##
   script)
   # M4 expansion.
-  $run_m4f -D_AC_WARNINGS=$_ac_warnings $infile >$tmp/configure || exit
+  $run_m4f -D_AC_WARNINGS=$_ac_warnings $infile >$tmp/configure ||
+    { (exit 1); exit; }
 
   # You can add your own prefixes to pattern if you want to check for
   # them too.
@@ -554,7 +555,8 @@ EOF
   do
     # The request may be several lines long, hence sed has to quit.
     trace_opt="$trace_opt -t "`echo "$trace" | sed -e 's/:.*//;q'`
-    echo "$trace" | $AWK -f $tmp/translate.awk >>$tmp/trace.m4 || exit
+    echo "$trace" | $AWK -f $tmp/translate.awk >>$tmp/trace.m4 ||
+      { (exit 1); exit; }
   done
   echo "divert(0)dnl" >>$tmp/trace.m4
 
index 1dd9b0ce87afad72183ff57e735b3f8ae25c6e12..d7eb14dde114ad6a2b3448fe4ac0a95282c19a92 100644 (file)
@@ -88,6 +88,7 @@ for autoconf in "$AUTOCONF" \
 done
 debug=false
 localdir=.
+status=0
 tmp=
 verbose=:
 warning_all=false
@@ -179,7 +180,7 @@ done
 $debug ||
 {
   trap 'status=$?; rm -rf $tmp && exit $status' 0
-  trap 'exit $?' 1 2 13 15
+  trap '(exit $?); exit' 1 2 13 15
 }
 
 # Create a (secure) tmp directory for tmp files.
@@ -194,7 +195,7 @@ $debug ||
 } ||
 {
    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   exit 1;
+   (exit 1); exit
 }
 
 # Preach.
@@ -217,7 +218,7 @@ if ($warning_all || $warning_obsolete) &&
     More sophisticated templates can also be produced, see the
     documentation.
 EOF
-  $warning_error && exit 1
+  $warning_error && { (exit 1); exit; }
 fi
 
 acconfigs=
@@ -230,7 +231,7 @@ case $# in
   *) exec >&2
      echo "$me: invalid number of arguments."
      echo "$help"
-     exit 1 ;;
+     (exit 1); exit ;;
 esac
 
 # Set up autoconf.
@@ -249,7 +250,7 @@ $autoconf  \
 $2"' \
   --trace AC_DEFINE:'syms="$$syms $1"' \
   --trace AC_DEFINE_UNQUOTED:'syms="$$syms $1"' \
-  $infile >$tmp/traces.sh || exit 1
+  $infile >$tmp/traces.sh || { (exit 1); exit; }
 
 $verbose $me: sourcing $tmp/traces.sh >&2
 . $tmp/traces.sh
@@ -271,7 +272,8 @@ syms=`for sym in $syms; do echo $sym; done |
 config_h=`echo "$config_h" | sed -e 's/ .*//'`
 # Support "outfile[:infile]", defaulting infile="outfile.in".
 case "$config_h" in
-"") echo "$me: error: AC_CONFIG_HEADERS not found in $infile" >&2; exit 1 ;;
+"") echo "$me: error: AC_CONFIG_HEADERS not found in $infile" >&2
+    (exit 1); exit ;;
 *:*) config_h_in=`echo "$config_h" | sed 's/.*://'`
      config_h=`echo "$config_h" | sed 's/:.*//'` ;;
 *) config_h_in="$config_h.in" ;;
@@ -305,7 +307,6 @@ test -f $config_h.bot && cat $config_h.bot >>$tmp/config.hin
 
 # Check that all the symbols have a template.
 $verbose $me: checking completeness of the template >&2
-status=0
 # Regexp for a white space.
 w='[   ]'
 if test -n "$syms"; then
@@ -336,4 +337,4 @@ if test $status = 0; then
   fi
 fi
 
-exit $status
+(exit $status); exit
index adffd6ba45f2605e0be22c167062e30a70ba2dea..09ce386a55271708eb14a2c939c98d26b5495a69 100644 (file)
@@ -100,6 +100,7 @@ install=false
 localdir=.
 # m4dir -- local Autoconf extensions.  Typically `m4'.
 m4dir=
+status=0
 # symlink -- when --install, use symlinks instead.
 symlink=false
 verbose=:
@@ -241,7 +242,7 @@ fi
 $debug ||
 {
   trap 'status=$?; rm -rf $tmp && exit $status' 0
-  trap 'exit $?' 1 2 13 15
+  trap '(exit $?); exit' 1 2 13 15
 }
 
 # Create a (secure) tmp directory for tmp files.
@@ -256,7 +257,7 @@ $debug ||
 } ||
 {
    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   exit 1;
+   (exit 1); exit
 }
 
 # When debugging, it is convenient that all the related temporary
@@ -275,7 +276,7 @@ cat >$tmp/alflags.sed <<EOF
 EOF
 
 # update.sh --
-# Exit 0 iff the first argument is not the most recent of all or is missing.
+# Exit 0 if the first argument is not the most recent of all or is missing.
 cat >$tmp/update.sh <<\EOF
 test -f "$1" || exit 0
 test x`ls -1dt "$@" 2>/dev/null | sed 1q` != x"$1"