]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
config.status: consistent exit status with nonexistent config file input.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 18 Jan 2010 19:26:22 +0000 (20:26 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 19 Jan 2010 06:28:48 +0000 (07:28 +0100)
* lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Ensure we
exit with status 1 rather than with that of 'false', for
reproducibility.
(AC_OUTPUT): Ensure to exit 1 in case of config.status failure.
* tests/torture.at (Missing templates): Also test code path
for $srcdir != '.'.
Report by Tim Rice.

ChangeLog
lib/autoconf/status.m4
tests/torture.at

index 1719deb93201430189c9469c99357e1778535ed8..eaee96bf6006d733fc8dfc2d78de2f797edf3cc9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       config.status: consistent exit status with nonexistent config file input.
+       * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Ensure we
+       exit with status 1 rather than with that of 'false', for
+       reproducibility.
+       (AC_OUTPUT): Ensure to exit 1 in case of config.status failure.
+       * tests/torture.at (Missing templates): Also test code path
+       for $srcdir != '.'.
+       Report by Tim Rice.
+
 2010-01-13  Eric Blake  <ebb9@byu.net>
 
        Fix previous example.
index f74bd34706241e514a96c6493fd2b0fdedb1d297..3fddc38b5ab07453d01ae4a437699d084e1d99b5 100644 (file)
@@ -1294,7 +1294,7 @@ if test "$no_create" != yes; then
   exec AS_MESSAGE_LOG_FD>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || AS_EXIT
+  $ac_cs_success || AS_EXIT([1])
 fi
 dnl config.status should not do recursion.
 AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
@@ -1666,7 +1666,7 @@ do
           [[\\/$]]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          AC_MSG_ERROR([cannot find input file: `$ac_f']);;
+          AC_MSG_ERROR([cannot find input file: `$ac_f'], [1]);;
       esac
       case $ac_f in *\'*) ac_f=`AS_ECHO(["$ac_f"]) | sed "s/'/'\\\\\\\\''/g"`;; esac
       AS_VAR_APPEND([ac_file_inputs], [" '$ac_f'"])
index ceea62c51425db73beb00eafddb062d9117a24a7..82916947a2b487321ad72a5ddd4582d7bed63700 100644 (file)
@@ -370,6 +370,15 @@ AC_OUTPUT
 ]])
 
 AT_CHECK_AUTOCONF
+mkdir build
+AT_CAPTURE_FILE([build/config.log])[]dnl
+cd build
+AT_CHECK([../configure], [1], [ignore],
+[[config.status: error: cannot find input file: `nonexistent.in'
+]])
+# Make sure that the output file doesn't exist
+AT_CHECK([test -f nonexistent], 1)
+cd ..
 AT_CHECK_CONFIGURE([], [1], [],
 [[config.status: error: cannot find input file: `nonexistent.in'
 ]])