From: Pavel Roskin Date: Wed, 1 Nov 2000 19:57:54 +0000 (+0000) Subject: * autoconf.sh: Using trap-safe "exit". X-Git-Tag: autoconf-2.50~490 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33de71ca28e1ab6d9e89ed11faab4ef376b05017;p=thirdparty%2Fautoconf.git * autoconf.sh: Using trap-safe "exit". * autoreconf.sh: Likewise. * autoupdate.sh: Likewise. * tests/base.at: Use AS_EXIT instead of exit in configure.in. * tests/m4sh.at: Likewise. * tests/semantics.at: Likewise. --- diff --git a/ChangeLog b/ChangeLog index c6cd85658..9dce4c8af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-11-01 Pavel Roskin + + * autoconf.sh: Using trap-safe "exit". + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * tests/base.at: Use AS_EXIT instead of exit in configure.in. + * tests/m4sh.at: Likewise. + * tests/semantics.at: Likewise. + 2000-11-01 Akim Demaille In M4sugar, move `define', `undefine', and `defn' into the `m4_' diff --git a/autoconf.in b/autoconf.in index b1e97b6cd..c13b80d88 100644 --- a/autoconf.in +++ b/autoconf.in @@ -390,7 +390,7 @@ case $task in } } EOF - $AWK -f $tmp/finalize.awk <$tmp/configure >&4 || exit 1 + $AWK -f $tmp/finalize.awk <$tmp/configure >&4 || { (exit 1); exit; } ;; # End of the task script. diff --git a/autoconf.sh b/autoconf.sh index b1e97b6cd..c13b80d88 100644 --- a/autoconf.sh +++ b/autoconf.sh @@ -390,7 +390,7 @@ case $task in } } EOF - $AWK -f $tmp/finalize.awk <$tmp/configure >&4 || exit 1 + $AWK -f $tmp/finalize.awk <$tmp/configure >&4 || { (exit 1); exit; } ;; # End of the task script. diff --git a/autoreconf.in b/autoreconf.in index 5d3634d13..18a62d667 100644 --- a/autoreconf.in +++ b/autoreconf.in @@ -286,7 +286,7 @@ EOF # update.sh -- # 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 -f "$1" || { :; exit; } test x`ls -1dt "$@" 2>/dev/null | sed 1q` != x"$1" EOF update="@SHELL@ $tmp/update.sh" diff --git a/autoreconf.sh b/autoreconf.sh index 5d3634d13..18a62d667 100644 --- a/autoreconf.sh +++ b/autoreconf.sh @@ -286,7 +286,7 @@ EOF # update.sh -- # 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 -f "$1" || { :; exit; } test x`ls -1dt "$@" 2>/dev/null | sed 1q` != x"$1" EOF update="@SHELL@ $tmp/update.sh" diff --git a/bin/autoconf.in b/bin/autoconf.in index b1e97b6cd..c13b80d88 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -390,7 +390,7 @@ case $task in } } EOF - $AWK -f $tmp/finalize.awk <$tmp/configure >&4 || exit 1 + $AWK -f $tmp/finalize.awk <$tmp/configure >&4 || { (exit 1); exit; } ;; # End of the task script. diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 5d3634d13..18a62d667 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -286,7 +286,7 @@ EOF # update.sh -- # 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 -f "$1" || { :; exit; } test x`ls -1dt "$@" 2>/dev/null | sed 1q` != x"$1" EOF update="@SHELL@ $tmp/update.sh" diff --git a/tests/base.at b/tests/base.at index bcd54a79e..8de52953a 100644 --- a/tests/base.at +++ b/tests/base.at @@ -18,7 +18,7 @@ AT_SETUP(AC_REQUIRE) AT_DATA(configure.in, [[define([REQUIRE_AND_CHECK], [AC_REQUIRE([$1])dnl -test -z "$translit([$1], [A-Z], [a-z])" && exit 1]) +test -z "$translit([$1], [A-Z], [a-z])" && AS_EXIT(1)]) AC_DEFUN([TEST1], [REQUIRE_AND_CHECK([TEST2a]) @@ -40,7 +40,7 @@ AC_PLAIN_SCRIPT TEST1 test -z "$test1" && AC_MSG_ERROR([\$test1 is empty]) -exit 0 +AS_EXIT(0) ]]) AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], []) diff --git a/tests/m4sh.at b/tests/m4sh.at index 88aa3ed32..d1ab5be96 100644 --- a/tests/m4sh.at +++ b/tests/m4sh.at @@ -27,7 +27,7 @@ test -d $pwd/1/2/3/4/5/6 || AS_MKDIR_P(a/b/c/d/e/f) test -d a/b/c/d/e/f || AC_MSG_ERROR([a/b/c/d/e/f has not been properly created]) -exit 0 +AS_EXIT(0) ]]) AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], []) @@ -99,7 +99,7 @@ AS_DIRNAME_SED_TEST([//1//3/], [//1]) AS_DIRNAME_SED_TEST([/1//3/], [/1]) AS_DIRNAME_SED_TEST([./1//3/], [./1]) AS_DIRNAME_SED_TEST([../../2//3/], [../../2]) -exit 0 +AS_EXIT(0) ]]) AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], []) diff --git a/tests/semantics.at b/tests/semantics.at index 3c538941a..c9810d3a6 100644 --- a/tests/semantics.at +++ b/tests/semantics.at @@ -29,7 +29,7 @@ AC_TRY_LINK_FUNC(Be_doomed_if_your_libc_has_a_function_named_like_this, # But there are systems without libm, on which we don't want to have # this test fail, so exit successfully if `cos' is in libc. AT_CHECK_MACRO(AC_CHECK_LIB, -[AC_TRY_LINK_FUNC(cos, exit 0) +[AC_TRY_LINK_FUNC(cos, [AS_EXIT(0)]) AC_CHECK_LIB(m, cos,, [AC_MSG_ERROR([cannot find `cos'])])]) @@ -257,7 +257,7 @@ test "$TOOL6" = tool || fail=: # no AC_OUTPUT, we don't need config.status. $fail && AC_MSG_ERROR([[CHECK_PROG failed]]) -exit 0 +AS_EXIT(0) ]]) AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], []) @@ -297,7 +297,7 @@ test "$TOOL4" = $pwd/path/1/tool || fail=: # no AC_OUTPUT, we don't need config.status. $fail && AC_MSG_ERROR([[PATH_PROG failed]]) -exit 0 +AS_EXIT(0) ]]) AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])