]> sourceware.org Git - automake.git/commitdiff
* m4/header.m4 (_AM_CONFIG_HEADER_INSINUATE): New function,
authorAlexandre Duret-Lutz <adl@gnu.org>
Fri, 19 Apr 2002 10:13:24 +0000 (10:13 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Fri, 19 Apr 2002 10:13:24 +0000 (10:13 +0000)
override AC_CONFIG_HEADERS with AM_CONFIG_HEADER.
(_AM_CONFIG_HEADER): Use _AM_AC_CONFIG_HEADERS.
* m4/init.m4: Call _AM_CONFIG_HEADER_INSINUATE.
* tests/stamph2.test: Use AC_CONFIG_HEADERS for some of the config
files.
* tests/confh5.test: New file.
* tests/Makefile.am (TESTS): Add confh5.test.
* automake.texi (Optional, Public macros): Update descriptions
of AC_CONFIG_HEADERS and AM_CONFIG_HEADER.

ChangeLog
NEWS
automake.texi
m4/header.m4
m4/init.m4
stamp-vti
tests/Makefile.am
tests/Makefile.in
tests/confh5.test [new file with mode: 0755]
tests/stamph2.test
version.texi

index 8a4738dbbdc1f9e96d06f4096149acc63de90ce0..8b62d4989ebb6320a2bff3b2e1acc3c45d1cab6b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2002-04-19  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * m4/header.m4 (_AM_CONFIG_HEADER_INSINUATE): New function,
+       override AC_CONFIG_HEADERS with AM_CONFIG_HEADER.
+       (_AM_CONFIG_HEADER): Use _AM_AC_CONFIG_HEADERS.
+       * m4/init.m4: Call _AM_CONFIG_HEADER_INSINUATE.
+       * tests/stamph2.test: Use AC_CONFIG_HEADERS for some of the config
+       files.
+       * tests/confh5.test: New file.
+       * tests/Makefile.am (TESTS): Add confh5.test.
+       * automake.texi (Optional, Public macros): Update descriptions
+       of AC_CONFIG_HEADERS and AM_CONFIG_HEADER.
+
 2002-04-13  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * tests/man2.test: New file.
diff --git a/NEWS b/NEWS
index 550149e1e04042dde1244ba00f2c0f5d4d217156..dac1f757bf4fae9daa4d052d19edca0cdc54b9d5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
 New in 1.6a:
+* It is no longuer a requirement to use AM_CONFIG_HEADER instead of
+  AC_CONFIG_HEADERS.  AM_CONFIG_HEADER is obsolete.
 * Use Autoconf's --trace interface to inspect configure.ac and get
   a more accurate view of it.
 * automake --output-dir is deprecated
index d299aef85e809e74907d8fde983d5883f82f2b89..555e2b662e44a997764a56ecef6d0eab52b930e6 100644 (file)
@@ -1115,12 +1115,11 @@ generated @file{Makefile.in} appropriately.  Currently recognized macros
 and their effects are:
 
 @table @code
-@item AC_CONFIG_HEADER
-Automake requires the use of @code{AM_CONFIG_HEADER} (@pxref{Macros}),
-which is similar to @code{AC_CONFIG_HEADER} (@pxref{Configuration
-Headers, , Configuration Header Files, autoconf, The Autoconf Manual}),
-but does some useful Automake-specific work.
-@cvindex AC_CONFIG_HEADER
+@item AC_CONFIG_HEADERS
+Automake will generate rules to rebuild these headers.  Older versions
+of Automake required the use of @code{AM_CONFIG_HEADER}
+(@pxref{Macros}); this no longuer the case today.
+@cvindex AC_CONFIG_HEADERS
 
 @item AC_CONFIG_AUX_DIR
 Automake will look for various helper scripts, such as
@@ -1385,7 +1384,8 @@ Automake ships with several Autoconf macros that you can use from your
 @table @code
 @item AM_CONFIG_HEADER
 Automake will generate rules to automatically regenerate the config
-header.
+header.  This obsolete macro is a synonym of @code{AC_CONFIG_HEADERS}
+today (@pxref{Optional}).
 @cvindex AM_CONFIG_HEADER
 
 @item AM_ENABLE_MULTILIB
@@ -2326,7 +2326,7 @@ instance, @samp{-I} and @samp{-D} options should be listed here.
 Automake already provides some @samp{-I} options automatically.  In
 particular it generates @samp{-I$(srcdir)}, @samp{-I.}, and a @samp{-I}
 pointing to the directory holding @file{config.h} (if you've used
-@code{AC_CONFIG_HEADER} or @code{AM_CONFIG_HEADER}).  You can disable
+@code{AC_CONFIG_HEADERS} or @code{AM_CONFIG_HEADER}).  You can disable
 the default @samp{-I} options using the @samp{nostdinc} option.
 
 @item INCLUDES
index 63b90e5af9dd244cfafa798f34380948f4af99ce..dc602a5487cf7b68ace48ce13fee8a51dc0836cf 100644 (file)
@@ -62,7 +62,7 @@ AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
 AC_DEFUN([_AM_CONFIG_HEADER],
 [# Add the stamp file to the list of files AC keeps track of,
 # along with our hook.
-AC_CONFIG_HEADERS([$1],
+_AM_AC_CONFIG_HEADERS([$1],
                   [# update the timestamp
 echo 'timestamp for $1' >"_AM_STAMP([$1])"
 $2],
@@ -75,3 +75,20 @@ $2],
 AC_DEFUN([AM_CONFIG_HEADER],
 [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
 ])# AM_CONFIG_HEADER
+
+
+# _AM_CONFIG_HEADER_INSINUATE
+# ---------------------------
+# Replace AC_CONFIG_HEADERS with our AM_CONFIG_HEADER.
+# We don't care about AC_CONFIG_HEADER (without S): it's an obsolete
+# Autoconf macro which will simply call AC_CONFIG_HEADERS (with S).
+AC_DEFUN([_AM_CONFIG_HEADER_INSINUATE], [
+dnl Since the substitution is only effective after AM_INIT_AUTOMAKE,
+dnl make sure AC_CONFIG_HEADERS is not called before.
+AC_BEFORE([AM_INIT_AUTOMAKE], [AC_CONFIG_HEADERS])dnl
+dnl Save the previous AC_CONFIG_HEADERS definition
+m4_rename([AC_CONFIG_HEADERS], [_AM_AC_CONFIG_HEADERS])dnl
+dnl Setup ours.
+dnl (Don't use m4_copy because we are tracing AM_CONFIG_HEADER.)
+AC_DEFUN([AC_CONFIG_HEADERS], [AM_CONFIG_HEADER($][@)])dnl
+])
index c435f4e61d4cdd46dc66ee8bf99eb9394f2f98c7..65e6e431ab0fef416833058ef357ee0736ca7b2e 100644 (file)
@@ -87,13 +87,14 @@ AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
 _AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_][CC],
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
                   [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_][CC],
-                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_][CXX],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
                   [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_][CXX],
-                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 ])
+_AM_CONFIG_HEADER_INSINUATE
 ])
index 90fbfc78adbfa1e978ee17d0cfe5a02367bc50bb..ed5cae0a0b3768586803ee816366c87c6b8d6a6a 100644 (file)
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 12 April 2002
+@set UPDATED 19 April 2002
 @set UPDATED-MONTH April 2002
 @set EDITION 1.6a
 @set VERSION 1.6a
index cec29a447bc2d8be23a3b446cecb8085fc49f997..411bb3a8facb8bdb37b6a462cc8ee8a584bffe23 100644 (file)
@@ -92,6 +92,7 @@ confdeps.test \
 confdist.test \
 confh.test \
 confh4.test \
+confh5.test \
 config.test \
 confincl.test \
 confsub.test \
index 717ac2a9ab14dd1306686b31f5eded8dd3dc835a..2cb29ef3fb78ef0a4c259f4384e2d1a60b356791 100644 (file)
@@ -176,6 +176,7 @@ confdeps.test \
 confdist.test \
 confh.test \
 confh4.test \
+confh5.test \
 config.test \
 confincl.test \
 confsub.test \
diff --git a/tests/confh5.test b/tests/confh5.test
new file mode 100755 (executable)
index 0000000..a91b0ee
--- /dev/null
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+# Make sure Autoconf complains if AC_CONFIG_HEADERS appears
+# before AM_INIT_AUTOMAKE.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AC_INIT
+AC_CONFIG_HEADERS(config.h)
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_OUTPUT
+END
+
+: > config.h.in
+
+$ACLOCAL || exit 1
+$AUTOCONF 2>&1 | grep AC_CONFIG_HEADERS || exit 1
+:
index f25e68314e3f515bed82355be17cb136e914bd3c..a7bf948236e600b241aafb9f6e21bae882e9baf5 100755 (executable)
@@ -3,18 +3,16 @@
 # Make sure stamp-h* files are created where we expect
 . $srcdir/defs || exit 1
 
-cat > configure.in << END
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE($me, 1.0)
+cat >> configure.in << END
 AM_CONFIG_HEADER(1.h
                  2.h:config.hin
-                 3.h:sdir1/config1.hin
-
-                 sdir1/4.h
-                 sdir1/5.h:config.hin
-                 sdir1/6.h:sdir1/config1.hin
-                 sdir1/7.h:sdir2/config2.hin)
-AC_OUTPUT(Makefile)
+                 3.h:sdir1/config1.hin)
+# AM_CONFIG_HEADER and AC_CONFIG_HEADERS should be synonyms.
+AC_CONFIG_HEADERS(sdir1/4.h
+                  sdir1/5.h:config.hin
+                  sdir1/6.h:sdir1/config1.hin
+                  sdir1/7.h:sdir2/config2.hin)
+AC_OUTPUT
 END
 
 : > Makefile.am
index 90fbfc78adbfa1e978ee17d0cfe5a02367bc50bb..ed5cae0a0b3768586803ee816366c87c6b8d6a6a 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 12 April 2002
+@set UPDATED 19 April 2002
 @set UPDATED-MONTH April 2002
 @set EDITION 1.6a
 @set VERSION 1.6a
This page took 0.05719 seconds and 5 git commands to generate.