autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

config.status doesn't exit


From: Pavel Roskin
Subject: config.status doesn't exit
Date: Wed, 20 Sep 2000 16:50:26 -0400 (EDT)

Hello!

This program:

#! /bin/sh
tmp=`exit 1`
echo "I'm alive"

prints "I'm alive" under all shells except ash. But config.status uses
this construct when checking existance of the input files and expects to
exit in all shells.

The patch is attached. It also included a test case.

ChangeLog:
        * acgeneral.m4 (_AC_OUTPUT_FILES): Ensure that config.status
        exits if any input file is missing.
        * tests/semantics.m4 (missing templates): Test it.

Regards,
Pavel Roskin

__________________________________
Index: acgeneral.m4
--- acgeneral.m4        Tue Sep 19 08:30:17 2000
+++ acgeneral.m4        Wed Sep 20 16:31:31 2000
@@ -4775,7 +4777,7 @@
            AC_MSG_ERROR([cannot find input file \\`$f'])
          fi;;
       esac
-    done`
+    done` || exit 1
 EOF
 cat >>$CONFIG_STATUS <<EOF
 dnl Neutralize VPATH when `$srcdir' = `.'.
Index: tests/semantics.m4
--- tests/semantics.m4  Tue Sep 19 14:17:34 2000
+++ tests/semantics.m4  Wed Sep 20 16:47:22 2000
@@ -416,3 +416,26 @@
 ])
 
 AT_CLEANUP(header file link command header.in file.in link.in command.in 
configure config.status)
+
+
+
+## ------------------------------------------------------ ##
+## Check that config.status detects missing input files.  ##
+## ------------------------------------------------------ ##
+
+AT_SETUP(missing templates)
+
+AT_DATA(configure.in,
+[[AC_INIT
+AC_CONFIG_FILES([nonexistent])
+AC_OUTPUT
+]])
+
+AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0)
+AT_CHECK([./configure], 1, ignore,
+[[configure: error: cannot find input file `nonexistent.in'
+]])
+# Make sure that the output file doesn't exist
+AT_CHECK([test -f nonexistent], 1)
+
+AT_CLEANUP(configure config.status config.log config.cache config.h defs)
__________________________________




reply via email to

[Prev in Thread] Current Thread [Next in Thread]