* autoheader.sh (trap 1 2 13 15): s/exit/exit $?/.
* autoconf.sh: Likewise.
Remove translate_awk too.
* autoupdate.sh: Likewise.
Handle `--debug'.
+2000-03-13 Akim Demaille <akim@epita.fr>
+
+ Trap on 0 is not executed when `exit' is called without argument.
+
+ * autoheader.sh (trap 1 2 13 15): s/exit/exit $?/.
+ * autoconf.sh: Likewise.
+ Remove translate_awk too.
+ * autoupdate.sh: Likewise.
+ Handle `--debug'.
+
2000-03-13 Akim Demaille <akim@epita.fr>
More uniform style is scripts.
initialization=false
localdir=
outfile=
+# Exit status.
+status=0
# Tasks:
# - trace
# Trace the first arguments of some macros
esac
# Trap on 0 to stop playing with `rm'.
-if $debug; then
+$debug ||
+{
trap 'status=$?
- rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
- trap exit 1 2 13 15
-fi
+ rm -f $tmpin $tmpout $silent_m4 $trace_m4 $translate_awk &&
+ exit $status' 0
+ trap 'exit $?' 1 2 13 15
+}
if test z$infile = z-; then
infile=$tmpin
# alternation.
pattern="A[CHM]_"
- status=0
if grep "^[^#]*$pattern" $tmpout >/dev/null 2>&1; then
echo "$me: undefined macros:" >&2
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
initialization=false
localdir=
outfile=
+# Exit status.
+status=0
# Tasks:
# - trace
# Trace the first arguments of some macros
esac
# Trap on 0 to stop playing with `rm'.
-if $debug; then
+$debug ||
+{
trap 'status=$?
- rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
- trap exit 1 2 13 15
-fi
+ rm -f $tmpin $tmpout $silent_m4 $trace_m4 $translate_awk &&
+ exit $status' 0
+ trap 'exit $?' 1 2 13 15
+}
if test z$infile = z-; then
infile=$tmpin
# alternation.
pattern="A[CHM]_"
- status=0
if grep "^[^#]*$pattern" $tmpout >/dev/null 2>&1; then
echo "$me: undefined macros:" >&2
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
esac
# Trap on 0 to stop playing with `rm'.
-$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
-$debug || trap exit 1 2 13 15
+$debug ||
+{
+ trap 'status=$?; rm -f $tmpbase* && exit $status' 0
+ trap 'exit $?' 1 2 13 15
+}
# Well, work now!
config_h=
esac
# Trap on 0 to stop playing with `rm'.
-$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
-$debug || trap exit 1 2 13 15
+$debug ||
+{
+ trap 'status=$?; rm -f $tmpbase* && exit $status' 0
+ trap 'exit $?' 1 2 13 15
+}
# Well, work now!
config_h=
initialization=false
localdir=
outfile=
+# Exit status.
+status=0
# Tasks:
# - trace
# Trace the first arguments of some macros
esac
# Trap on 0 to stop playing with `rm'.
-if $debug; then
+$debug ||
+{
trap 'status=$?
- rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
- trap exit 1 2 13 15
-fi
+ rm -f $tmpin $tmpout $silent_m4 $trace_m4 $translate_awk &&
+ exit $status' 0
+ trap 'exit $?' 1 2 13 15
+}
if test z$infile = z-; then
infile=$tmpin
# alternation.
pattern="A[CHM]_"
- status=0
if grep "^[^#]*$pattern" $tmpout >/dev/null 2>&1; then
echo "$me: undefined macros:" >&2
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
esac
# Trap on 0 to stop playing with `rm'.
-$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
-$debug || trap exit 1 2 13 15
+$debug ||
+{
+ trap 'status=$?; rm -f $tmpbase* && exit $status' 0
+ trap 'exit $?' 1 2 13 15
+}
# Well, work now!
config_h=