]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/atgeneral.m4 (AT_CHECK): Accept if-failed and
authorAkim Demaille <akim@epita.fr>
Tue, 19 Dec 2000 08:15:20 +0000 (08:15 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 19 Dec 2000 08:15:20 +0000 (08:15 +0000)
if-not-failed.
* tests/atspecific.m4 (AT_CHECK_CONFIGURE): Use it in order to
dump config.log when configure failed.  Before, the log was
reported only on success.

ChangeLog
lib/autotest/general.m4
tests/Makefile.in
tests/atgeneral.m4
tests/atspecific.m4

index 46d0eb3c4844aefadfd355f36d0f915d18eee50e..ca68c1bc85ab8e148542d9bad3815b73e613dc84 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-12-19  Akim Demaille  <akim@epita.fr>
+
+       * tests/atgeneral.m4 (AT_CHECK): Accept if-failed and
+       if-not-failed.
+       * tests/atspecific.m4 (AT_CHECK_CONFIGURE): Use it in order to
+       dump config.log when configure failed.  Before, the log was
+       reported only on success.
+
 2000-12-19  Akim Demaille  <akim@epita.fr>
 
        * tests/foreign.at: New file.
index 433fd1ec1c6e81091183b14202aa67ad3dc6337c..3cdc385c02e6e7b7bc2207db24cc16234c970d19 100644 (file)
@@ -433,21 +433,21 @@ $at_traceon
 ( $1 ) >stdout 2>stderr
 at_status=$?
 $at_traceoff
-at_continue=:
+at_failed=false
 dnl Check stderr.
 m4_case([$4],
         ignore, [cat stderr >&5],
         experr, [AT_CLEANUP_FILE([experr])dnl
-$at_diff experr stderr >&5 || at_continue='exit 1'],
-        [], [$at_diff empty stderr >&5 || at_continue='exit 1'],
-        [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_continue='exit 1'])
+$at_diff experr stderr >&5 || at_failed=:],
+        [], [$at_diff empty stderr >&5 || at_failed=:],
+        [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_failed=:])
 dnl Check stdout.
 m4_case([$3],
         ignore, [cat stdout >&5],
         expout, [AT_CLEANUP_FILES([expout])dnl
-$at_diff expout stdout >&5 || at_continue='exit 1'],
-        [], [$at_diff empty stdout >&5 || at_continue='exit 1'],
-        [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_continue='exit 1'])
+$at_diff expout stdout >&5 || at_failed=:],
+        [], [$at_diff empty stdout >&5 || at_failed=:],
+        [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_failed=:])
 dnl Check exit val.
 case $at_status in
   77) exit 77;;
@@ -456,8 +456,9 @@ m4_case([$2],
     [   *);;],
     [   m4_default([$2], [0])) ;;
    *) $at_verbose "Exit code was $at_status, expected $2" >&2
-      at_continue='exit 1';;])
+      at_failed=:;;])
 esac
-$at_continue
+AS_IFELSE($at_failed, [$5], [$6])
+$at_failed && exit 1
 $at_traceon
 ])# AT_CHECK
index e98b48c841de631fdb1e999b47cad060b63df868..8260da0a9affeb6305b6b3d7c160d6a6a3aff0ee 100644 (file)
@@ -84,7 +84,7 @@ DISTCLEANFILES = atconfig testsuite
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES =  atconfig
 DIST_COMMON =  README Makefile.am Makefile.in atconfig.in config.guess \
-config.sub ltconfig ltmain.sh
+config.sub configure configure.in ltconfig ltmain.sh
 
 
 PACKAGE = @PACKAGE@
index 433fd1ec1c6e81091183b14202aa67ad3dc6337c..3cdc385c02e6e7b7bc2207db24cc16234c970d19 100644 (file)
@@ -433,21 +433,21 @@ $at_traceon
 ( $1 ) >stdout 2>stderr
 at_status=$?
 $at_traceoff
-at_continue=:
+at_failed=false
 dnl Check stderr.
 m4_case([$4],
         ignore, [cat stderr >&5],
         experr, [AT_CLEANUP_FILE([experr])dnl
-$at_diff experr stderr >&5 || at_continue='exit 1'],
-        [], [$at_diff empty stderr >&5 || at_continue='exit 1'],
-        [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_continue='exit 1'])
+$at_diff experr stderr >&5 || at_failed=:],
+        [], [$at_diff empty stderr >&5 || at_failed=:],
+        [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_failed=:])
 dnl Check stdout.
 m4_case([$3],
         ignore, [cat stdout >&5],
         expout, [AT_CLEANUP_FILES([expout])dnl
-$at_diff expout stdout >&5 || at_continue='exit 1'],
-        [], [$at_diff empty stdout >&5 || at_continue='exit 1'],
-        [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_continue='exit 1'])
+$at_diff expout stdout >&5 || at_failed=:],
+        [], [$at_diff empty stdout >&5 || at_failed=:],
+        [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_failed=:])
 dnl Check exit val.
 case $at_status in
   77) exit 77;;
@@ -456,8 +456,9 @@ m4_case([$2],
     [   *);;],
     [   m4_default([$2], [0])) ;;
    *) $at_verbose "Exit code was $at_status, expected $2" >&2
-      at_continue='exit 1';;])
+      at_failed=:;;])
 esac
-$at_continue
+AS_IFELSE($at_failed, [$5], [$6])
+$at_failed && exit 1
 $at_traceon
 ])# AT_CHECK
index b4b49c67d8a3b31e392b5b33404555661768495b..22f04d43732534cc555678589a7514926889922d 100644 (file)
@@ -44,8 +44,8 @@ m4_define([AT_CHECK_CONFIGURE],
 [AT_CLEANUP_FILE_IFELSE([config.hin],
                         [AT_CLEANUP_FILE(config.h)])dnl
 AT_CLEANUP_FILES(config.log config.status config.cache)dnl
-AT_CHECK([top_srcdir=$top_srcdir ./configure], 0, ignore, [])
-test $at_verbose = echo && echo "--- config.log" && cat config.log])
+AT_CHECK([top_srcdir=$top_srcdir ./configure], 0, ignore, [],
+        [test $at_verbose = echo && echo "--- config.log" && cat config.log])])
 
 
 # _AT_CHECK_AC_MACRO(AC-BODY, PRE-TESTS)