* 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-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.
## --------------------------------- ##
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.
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
## --------------------------------- ##
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.
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
done
debug=false
localdir=.
+status=0
tmp=
verbose=:
warning_all=false
$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.
} ||
{
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
- exit 1;
+ (exit 1); exit
}
# Preach.
More sophisticated templates can also be produced, see the
documentation.
EOF
- $warning_error && exit 1
+ $warning_error && { (exit 1); exit; }
fi
acconfigs=
*) exec >&2
echo "$me: invalid number of arguments."
echo "$help"
- exit 1 ;;
+ (exit 1); exit ;;
esac
# Set up 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
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" ;;
# 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
fi
fi
-exit $status
+(exit $status); exit
done
debug=false
localdir=.
+status=0
tmp=
verbose=:
warning_all=false
$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.
} ||
{
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
- exit 1;
+ (exit 1); exit
}
# Preach.
More sophisticated templates can also be produced, see the
documentation.
EOF
- $warning_error && exit 1
+ $warning_error && { (exit 1); exit; }
fi
acconfigs=
*) exec >&2
echo "$me: invalid number of arguments."
echo "$help"
- exit 1 ;;
+ (exit 1); exit ;;
esac
# Set up 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
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" ;;
# 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
fi
fi
-exit $status
+(exit $status); exit
localdir=.
# m4dir -- local Autoconf extensions. Typically `m4'.
m4dir=
+status=0
# symlink -- when --install, use symlinks instead.
symlink=false
verbose=:
$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.
} ||
{
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
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"
localdir=.
# m4dir -- local Autoconf extensions. Typically `m4'.
m4dir=
+status=0
# symlink -- when --install, use symlinks instead.
symlink=false
verbose=:
$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.
} ||
{
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
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"
## --------------------------------- ##
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.
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
done
debug=false
localdir=.
+status=0
tmp=
verbose=:
warning_all=false
$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.
} ||
{
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
- exit 1;
+ (exit 1); exit
}
# Preach.
More sophisticated templates can also be produced, see the
documentation.
EOF
- $warning_error && exit 1
+ $warning_error && { (exit 1); exit; }
fi
acconfigs=
*) exec >&2
echo "$me: invalid number of arguments."
echo "$help"
- exit 1 ;;
+ (exit 1); exit ;;
esac
# Set up 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
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" ;;
# 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
fi
fi
-exit $status
+(exit $status); exit
localdir=.
# m4dir -- local Autoconf extensions. Typically `m4'.
m4dir=
+status=0
# symlink -- when --install, use symlinks instead.
symlink=false
verbose=:
$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.
} ||
{
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
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"