]> sourceware.org Git - automake.git/commitdiff
* m4/header.m4 (AM_CONFIG_HEADER): Rename to ...
authorAlexandre Duret-Lutz <adl@gnu.org>
Fri, 14 Jun 2002 06:48:29 +0000 (06:48 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Fri, 14 Jun 2002 06:48:29 +0000 (06:48 +0000)
(_AM_CONFIG_HEADERS): ... this.
(_AM_CONFIG_HEADER_INSINUATE): Define AC_CONFIG_HEADERS to
call _AM_CONFIG_HEADERS; and AM_CONFIG_HEADER to call
AC_CONFIG_HEADERS.
* automake.in (scan_autoconf_traces): Trace AC_CONFIG_HEADERS
instead of AM_CONFIG_HEADER.
* tests/autoheader2.test: New file.
* tests/Makefile.am (TESTS): Add autoheader2.test.
Suggested by Raja R Harinath.

ChangeLog
automake.in
m4/header.m4
tests/Makefile.am
tests/Makefile.in
tests/autoheader2.test [new file with mode: 0755]

index b880b5410e3a7f9a1d6c756a5a06dae3c3abd291..df30c8d810026494678ebcfe5ac06e13fe7675a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2002-06-14  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * m4/header.m4 (AM_CONFIG_HEADER): Rename to ...
+       (_AM_CONFIG_HEADERS): ... this.
+       (_AM_CONFIG_HEADER_INSINUATE): Define AC_CONFIG_HEADERS to
+       call _AM_CONFIG_HEADERS; and AM_CONFIG_HEADER to call
+       AC_CONFIG_HEADERS.
+       * automake.in (scan_autoconf_traces): Trace AC_CONFIG_HEADERS
+       instead of AM_CONFIG_HEADER.
+       * tests/autoheader2.test: New file.
+       * tests/Makefile.am (TESTS): Add autoheader2.test.
+       Suggested by Raja R Harinath.
+
 2002-06-13  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * m4/header.m4 (_AM_CONFIG_HEADER_INSINUATE): Use m4_copy instead
index 926b3e888ac615dc88a09d6eaf9f42aed72448a3..8ffa097b793d791d2c6ad9d9fb181b30ea1d64b6 100755 (executable)
@@ -4592,6 +4592,7 @@ sub scan_autoconf_traces ($)
                  AC_CANONICAL_SYSTEM
                  AC_CONFIG_AUX_DIR
                  AC_CONFIG_FILES
+                 AC_CONFIG_HEADERS
                  AC_INIT
                  AC_LIBSOURCE
                  AC_PROG_LEX
@@ -4599,7 +4600,6 @@ sub scan_autoconf_traces ($)
                  AC_SUBST
                  AM_AUTOMAKE_VERSION
                  AM_CONDITIONAL
-                 AM_CONFIG_HEADER
                  AM_C_PROTOTYPES
                  AM_GNU_GETTEXT
                  AM_INIT_AUTOMAKE
@@ -4649,6 +4649,11 @@ sub scan_autoconf_traces ($)
          $ac_config_files_location = $here;
          &scan_autoconf_config_files ($args[1]);
        }
+      elsif ($macro eq 'AC_CONFIG_HEADERS')
+       {
+         $config_header_location = $here;
+         push @config_headers, split (' ', $args[1]);
+       }
       elsif ($macro eq 'AC_INIT')
         {
          if (defined $args[2])
@@ -4697,11 +4702,6 @@ sub scan_autoconf_traces ($)
        {
          $configure_cond{$args[1]} = $here;
        }
-      elsif ($macro eq 'AM_CONFIG_HEADER')
-       {
-         $config_header_location = $here;
-         push @config_headers, split (' ', $args[1]);
-       }
       elsif ($macro eq 'AM_C_PROTOTYPES')
        {
          $am_c_prototypes = $here;
index c2c0a91cce2b7292b6501766c4df4f9084a20ec5..850341b327c399cadd6dcb1c244c8325ebb23808 100644 (file)
@@ -70,11 +70,11 @@ $2],
 ])# _AM_CONFIG_HEADER
 
 
-# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
-# --------------------------------------------------------------
-AC_DEFUN([AM_CONFIG_HEADER],
+# _AM_CONFIG_HEADERS(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
+# ----------------------------------------------------------------
+AC_DEFUN([_AM_CONFIG_HEADERS],
 [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
-])# AM_CONFIG_HEADER
+])# _AM_CONFIG_HEADERS
 
 
 # _AM_CONFIG_HEADER_INSINUATE
@@ -91,6 +91,8 @@ dnl (Beware: this must be m4_copy, not m4_rename, because we will
 dnl lose the --trace bit of AC_CONFIG_HEADERS if we undefine it.)
 m4_copy([AC_CONFIG_HEADERS], [_AM_AC_CONFIG_HEADERS])dnl
 dnl Override AC_CONFIG_HEADERS with ours.
-dnl (Don't use m4_copy because we are tracing AM_CONFIG_HEADER.)
-AC_DEFUN([AC_CONFIG_HEADERS], [AM_CONFIG_HEADER($][@)])dnl
+AC_DEFUN([AC_CONFIG_HEADERS], [_AM_CONFIG_HEADERS($][@)])dnl
+dnl Define AM_CONFIG_HEADERS (obsolete) in terms of AC_CONFIG_HEADERS.
+dnl This way autoheader will `see' the calls to AM_CONFIG_HEADER.
+AC_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($][@)])dnl
 ])
index 49ff1cb6b06927a93a506d5bfef821db154648b5..aa8fa3e65a46d67c1d48c27e4cd0e7944e9c4091 100644 (file)
@@ -31,6 +31,7 @@ ansi7.test \
 ar.test \
 asm.test \
 autoheader.test \
+autoheader2.test \
 auxdir.test \
 auxdir2.test \
 backsl.test \
index b4444c1980dfd0a0fc12b9174398bd2a43ac1aa9..ed733d0523fa265caa5df3427b437b96324c418a 100644 (file)
@@ -117,6 +117,7 @@ ansi7.test \
 ar.test \
 asm.test \
 autoheader.test \
+autoheader2.test \
 auxdir.test \
 auxdir2.test \
 backsl.test \
diff --git a/tests/autoheader2.test b/tests/autoheader2.test
new file mode 100755 (executable)
index 0000000..78eadea
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
+
+. $srcdir/defs
+
+set -e
+
+cat >>configure.in <<EOF
+AM_CONFIG_HEADER([thisfile.h])
+EOF
+
+: > Makefile.am
+
+$ACLOCAL
+$AUTOHEADER
+
+test -f thisfile.h.in
This page took 0.190814 seconds and 5 git commands to generate.