[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Ensure AC_CONFIG_FILES, AC_CONFIG_LINKS, and AC_CONFIG_COMMANDS
From: |
Ralf Wildenhues |
Subject: |
[PATCH] Ensure AC_CONFIG_FILES, AC_CONFIG_LINKS, and AC_CONFIG_COMMANDS are not prerequisites of `all'. |
Date: |
Sun, 18 Nov 2007 16:26:59 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
* tests/output13.test: New test.
* tests/Makefile.am: Adjust.
Prompted by report from Bruno Haible in
<http://lists.gnu.org/archive/html/bug-gnulib/2007-10/msg00479.html>.
---
Applied to master and branch-1-10, to address the question:
| - Is it possible to use AC_CONFIG_FILES conditionally? I.e.
|
| if test $gl_cv_stdint_correct = no; then
| AC_CONFIG_FILES([$sourcebase/stdint.h:$sourcebase/stdint.in.h])
| fi
|
| Will automake do the right thing with this?
Note that for automake it is important whether there are variables in
AC_CONFIG_FILES arguments (like $sourcebase above); see
<http://sources.redhat.com/automake/automake.html#Requirements>
but that is not the main part of Bruno's question. Anyway I will
address it in a separate mail.
This patch is only to ensure that shell-conditional AC_CONFIG_FOOS work
for FOOS != HEADERS, i.e., that automake won't cause them to be built at
`make' time if config.status has not generated them.
Cheers,
Ralf
tests/Makefile.am | 1 +
tests/Makefile.in | 1 +
tests/output13.test | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 58 insertions(+), 0 deletions(-)
create mode 100755 tests/output13.test
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3c586a1..c4e7fc6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -416,6 +416,7 @@ output9.test \
output10.test \
output11.test \
output12.test \
+output13.test \
overrid.test \
parse.test \
percent.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index b446130..e5e71ef 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -564,6 +564,7 @@ output9.test \
output10.test \
output11.test \
output12.test \
+output13.test \
overrid.test \
parse.test \
percent.test \
diff --git a/tests/output13.test b/tests/output13.test
new file mode 100755
index 0000000..05b8ea3
--- /dev/null
+++ b/tests/output13.test
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Make sure an AC_CONFIG_FILES, AC_CONFIG_LINKS, and AC_CONFIG_COMMANDS
+# are not prerequisites of `all'.
+
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << \END
+AC_SUBST([FOO], [foo])
+if $create; then
+ AC_CONFIG_FILES([file])
+ AC_CONFIG_LINKS([link:input])
+ AC_CONFIG_COMMANDS([stamp], [echo stamp > stamp])
+fi
+AC_OUTPUT
+END
+
+: >Makefile.am
+
+echo link > input
+echo @FOO@ >file.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure create=false
+$MAKE
+test ! -f file
+test ! -f link
+test ! -f stamp
+
+./configure create=:
+test -f file
+test -f link
+test -f stamp
--
1.5.3.5.561.g140d
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Ensure AC_CONFIG_FILES, AC_CONFIG_LINKS, and AC_CONFIG_COMMANDS are not prerequisites of `all'.,
Ralf Wildenhues <=