mirror of
git://git.sv.gnu.org/autoconf
synced 2024-11-21 01:01:48 +08:00
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'.
This commit is contained in:
parent
c1c5314017
commit
5e6f17e1f2
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
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>
|
2000-03-13 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
More uniform style is scripts.
|
More uniform style is scripts.
|
||||||
|
13
autoconf.in
13
autoconf.in
@ -96,6 +96,8 @@ debug=false
|
|||||||
initialization=false
|
initialization=false
|
||||||
localdir=
|
localdir=
|
||||||
outfile=
|
outfile=
|
||||||
|
# Exit status.
|
||||||
|
status=0
|
||||||
# Tasks:
|
# Tasks:
|
||||||
# - trace
|
# - trace
|
||||||
# Trace the first arguments of some macros
|
# Trace the first arguments of some macros
|
||||||
@ -200,11 +202,13 @@ case $# in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Trap on 0 to stop playing with `rm'.
|
# Trap on 0 to stop playing with `rm'.
|
||||||
if $debug; then
|
$debug ||
|
||||||
|
{
|
||||||
trap 'status=$?
|
trap 'status=$?
|
||||||
rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
|
rm -f $tmpin $tmpout $silent_m4 $trace_m4 $translate_awk &&
|
||||||
trap exit 1 2 13 15
|
exit $status' 0
|
||||||
fi
|
trap 'exit $?' 1 2 13 15
|
||||||
|
}
|
||||||
|
|
||||||
if test z$infile = z-; then
|
if test z$infile = z-; then
|
||||||
infile=$tmpin
|
infile=$tmpin
|
||||||
@ -236,7 +240,6 @@ case $task in
|
|||||||
# alternation.
|
# alternation.
|
||||||
pattern="A[CHM]_"
|
pattern="A[CHM]_"
|
||||||
|
|
||||||
status=0
|
|
||||||
if grep "^[^#]*$pattern" $tmpout >/dev/null 2>&1; then
|
if grep "^[^#]*$pattern" $tmpout >/dev/null 2>&1; then
|
||||||
echo "$me: undefined macros:" >&2
|
echo "$me: undefined macros:" >&2
|
||||||
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
|
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
|
||||||
|
13
autoconf.sh
13
autoconf.sh
@ -96,6 +96,8 @@ debug=false
|
|||||||
initialization=false
|
initialization=false
|
||||||
localdir=
|
localdir=
|
||||||
outfile=
|
outfile=
|
||||||
|
# Exit status.
|
||||||
|
status=0
|
||||||
# Tasks:
|
# Tasks:
|
||||||
# - trace
|
# - trace
|
||||||
# Trace the first arguments of some macros
|
# Trace the first arguments of some macros
|
||||||
@ -200,11 +202,13 @@ case $# in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Trap on 0 to stop playing with `rm'.
|
# Trap on 0 to stop playing with `rm'.
|
||||||
if $debug; then
|
$debug ||
|
||||||
|
{
|
||||||
trap 'status=$?
|
trap 'status=$?
|
||||||
rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
|
rm -f $tmpin $tmpout $silent_m4 $trace_m4 $translate_awk &&
|
||||||
trap exit 1 2 13 15
|
exit $status' 0
|
||||||
fi
|
trap 'exit $?' 1 2 13 15
|
||||||
|
}
|
||||||
|
|
||||||
if test z$infile = z-; then
|
if test z$infile = z-; then
|
||||||
infile=$tmpin
|
infile=$tmpin
|
||||||
@ -236,7 +240,6 @@ case $task in
|
|||||||
# alternation.
|
# alternation.
|
||||||
pattern="A[CHM]_"
|
pattern="A[CHM]_"
|
||||||
|
|
||||||
status=0
|
|
||||||
if grep "^[^#]*$pattern" $tmpout >/dev/null 2>&1; then
|
if grep "^[^#]*$pattern" $tmpout >/dev/null 2>&1; then
|
||||||
echo "$me: undefined macros:" >&2
|
echo "$me: undefined macros:" >&2
|
||||||
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
|
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
|
||||||
|
@ -158,8 +158,11 @@ case $# in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Trap on 0 to stop playing with `rm'.
|
# Trap on 0 to stop playing with `rm'.
|
||||||
$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
|
$debug ||
|
||||||
$debug || trap exit 1 2 13 15
|
{
|
||||||
|
trap 'status=$?; rm -f $tmpbase* && exit $status' 0
|
||||||
|
trap 'exit $?' 1 2 13 15
|
||||||
|
}
|
||||||
|
|
||||||
# Well, work now!
|
# Well, work now!
|
||||||
config_h=
|
config_h=
|
||||||
|
@ -158,8 +158,11 @@ case $# in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Trap on 0 to stop playing with `rm'.
|
# Trap on 0 to stop playing with `rm'.
|
||||||
$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
|
$debug ||
|
||||||
$debug || trap exit 1 2 13 15
|
{
|
||||||
|
trap 'status=$?; rm -f $tmpbase* && exit $status' 0
|
||||||
|
trap 'exit $?' 1 2 13 15
|
||||||
|
}
|
||||||
|
|
||||||
# Well, work now!
|
# Well, work now!
|
||||||
config_h=
|
config_h=
|
||||||
|
@ -96,6 +96,8 @@ debug=false
|
|||||||
initialization=false
|
initialization=false
|
||||||
localdir=
|
localdir=
|
||||||
outfile=
|
outfile=
|
||||||
|
# Exit status.
|
||||||
|
status=0
|
||||||
# Tasks:
|
# Tasks:
|
||||||
# - trace
|
# - trace
|
||||||
# Trace the first arguments of some macros
|
# Trace the first arguments of some macros
|
||||||
@ -200,11 +202,13 @@ case $# in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Trap on 0 to stop playing with `rm'.
|
# Trap on 0 to stop playing with `rm'.
|
||||||
if $debug; then
|
$debug ||
|
||||||
|
{
|
||||||
trap 'status=$?
|
trap 'status=$?
|
||||||
rm -f $tmpin $tmpout $silent_m4 $trace_m4 && exit $status' 0
|
rm -f $tmpin $tmpout $silent_m4 $trace_m4 $translate_awk &&
|
||||||
trap exit 1 2 13 15
|
exit $status' 0
|
||||||
fi
|
trap 'exit $?' 1 2 13 15
|
||||||
|
}
|
||||||
|
|
||||||
if test z$infile = z-; then
|
if test z$infile = z-; then
|
||||||
infile=$tmpin
|
infile=$tmpin
|
||||||
@ -236,7 +240,6 @@ case $task in
|
|||||||
# alternation.
|
# alternation.
|
||||||
pattern="A[CHM]_"
|
pattern="A[CHM]_"
|
||||||
|
|
||||||
status=0
|
|
||||||
if grep "^[^#]*$pattern" $tmpout >/dev/null 2>&1; then
|
if grep "^[^#]*$pattern" $tmpout >/dev/null 2>&1; then
|
||||||
echo "$me: undefined macros:" >&2
|
echo "$me: undefined macros:" >&2
|
||||||
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
|
sed -n "s/^[^#]*\\($pattern[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
|
||||||
|
@ -158,8 +158,11 @@ case $# in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Trap on 0 to stop playing with `rm'.
|
# Trap on 0 to stop playing with `rm'.
|
||||||
$debug || trap 'status=$?; rm -f $tmpbase* && exit $status' 0
|
$debug ||
|
||||||
$debug || trap exit 1 2 13 15
|
{
|
||||||
|
trap 'status=$?; rm -f $tmpbase* && exit $status' 0
|
||||||
|
trap 'exit $?' 1 2 13 15
|
||||||
|
}
|
||||||
|
|
||||||
# Well, work now!
|
# Well, work now!
|
||||||
config_h=
|
config_h=
|
||||||
|
Loading…
Reference in New Issue
Block a user