[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Making zsh happy again
From: |
Pavel Roskin |
Subject: |
Making zsh happy again |
Date: |
Wed, 1 Nov 2000 12:30:23 -0500 (EST) |
Hello!
Thanks to the changes in the testsuite we have new failures with zsh. It's
great because one of them indicates a real (albeit minor) problem in the
autoconf code (not in the testsuite).
I also tried to fix some problems that the testsuite didn't catch.
Sometimes I was so pedantic that I used things like
foo || exit 1 -> foo || { (exit 1); exit; }
bar && exit 0 -> bar && { :; exit; }
which were not needed (the exit code is already what we want it to be),
but it's better to use such constructs uniformely. It will be easier to
introduce AS_EXIT in the tools (autoconf, autoreconf) if the code is
already uses the safe construct.
As a side note, the testsuite passes with ash-0.2 without problems.
ChangeLog:
* autoconf.sh: Fixed a potential problem with "exit" status.
* autoreconf.sh: Likewise.
* autoupdate.sh: Fixed a real problem with "exit" status.
* tests/base.at: Use AS_EXIT instead of exit in configure.in.
* tests/m4sh.at: Likewise.
* tests/semantics.at: Likewise.
Regards,
Pavel Roskin
______________________________
Index: autoconf.sh
--- autoconf.sh Wed Nov 1 10:02:27 2000
+++ autoconf.sh Wed Nov 1 12:08:04 2000
@@ -390,7 +390,7 @@
}
}
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.
Index: autoreconf.sh
--- autoreconf.sh Fri Oct 27 09:48:15 2000
+++ autoreconf.sh Wed Nov 1 12:09:37 2000
@@ -286,7 +286,7 @@
# 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"
Index: autoupdate.sh
--- autoupdate.sh Tue Oct 31 13:15:52 2000
+++ autoupdate.sh Wed Nov 1 11:13:42 2000
@@ -381,7 +381,7 @@
$M4 $tmp/input.m4 >$tmp/updated ||
{
echo "$me: cannot update \`$filename'" >&2
- exit 1
+ (exit 1); exit
}
if test $file = $tmp/stdin; then
Index: tests/base.at
--- tests/base.at Fri Oct 27 10:18:13 2000
+++ tests/base.at Wed Nov 1 11:29:22 2000
@@ -18,7 +18,7 @@
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 @@
TEST1
test -z "$test1" &&
AC_MSG_ERROR([\$test1 is empty])
-exit 0
+AS_EXIT(0)
]])
AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
Index: tests/m4sh.at
--- tests/m4sh.at Fri Oct 27 10:18:13 2000
+++ tests/m4sh.at Wed Nov 1 11:29:54 2000
@@ -27,7 +27,7 @@
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([../../2//3/], [../../2])
-exit 0
+AS_EXIT(0)
]])
AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
Index: tests/semantics.at
--- tests/semantics.at Fri Oct 27 10:18:13 2000
+++ tests/semantics.at Wed Nov 1 11:27:38 2000
@@ -29,7 +29,7 @@
# 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 @@
# 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 @@
# 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, [], [])
______________________________
- Making zsh happy again,
Pavel Roskin <=