]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] compile: rename make variable CONFIG_HEADER -> AM_CONFIG_HEADERS
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 27 May 2012 13:48:30 +0000 (15:48 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 29 May 2012 10:48:14 +0000 (12:48 +0200)
The automake-generated variable 'CONFIG_HEADER' has never been
documented, and it violates user namespace.  So rename it to
'AM_CONFIG_HEADERS', to make it clear that it is owned by Automake.
We prefer that name to something that would sound more "private",
like 'am__config_headers', because there are possibly legitimate
usages of that variable on the user's part.

* automake.in: Do the rename.  Also, don't bother explicitly
rejecting the setting of 'CONFIG_HEADER' as an anachronism:
that warning has been active so long that any still maintained
Makefile.am file should have stopped doing that long ago.
* NG-NEWS: Update.
* lib/am/remake-hdr.am: Update a comment.
* syntax-checks.mk (modern.CONFIG_HEADER): New, define to
'AM_CONFIG_HEADERS'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NG-NEWS
automake.in
lib/am/remake-hdr.am
syntax-checks.mk

diff --git a/NG-NEWS b/NG-NEWS
index 216c95bbaa0554c4edcdf38b307769ece071a3e0..5250741f71bd82c170af3e712d882c096f72499f 100644 (file)
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -265,6 +265,12 @@ Miscellaneous
   variable $(AM_MAKEFLAGS) has been removed, and its content is no more
   passed to recursive make invocations.
 
+* The make variable 'CONFIG_HEADER' had never been documented in mainline
+  Automake, and since when the support for user setting of it has been
+  removed (in favour of the use of the 'AC_CONFIG_HEADERS' autoconf macro
+  in configure.ac), it has been intended as an internal variable only.
+  So we've renamed it to 'AM_CONFIG_HEADERS'.  Do not override its value
+  in your Makefiles!
 
 -----
 
index eeafd295bacba1fbc75f47344f529c2fe532415f..fb53813ccf1b5c93b17d050fcf1e7b430ee86e44 100644 (file)
@@ -2281,7 +2281,7 @@ sub handle_compile ()
       {
        my @incs = ('-I.', subst ('am__isrc'));
 
-       my $var = var 'CONFIG_HEADER';
+       my $var = var 'AM_CONFIG_HEADERS';
        if ($var)
          {
            foreach my $hdr (split (' ', $var->variable_value))
@@ -2292,8 +2292,9 @@ sub handle_compile ()
        # We want '-I. -I$(srcdir)', but the latter -I is redundant
        # and unaesthetic in non-VPATH builds.  We use `-I.@am__isrc@`
        # instead.  It will be replaced by '-I.' or '-I. -I$(srcdir)'.
-       # Items in CONFIG_HEADER are never in $(srcdir) so it is safe
-       # to just put @am__isrc@ right after '-I.', without a space.
+       # Items in AM_CONFIG_HEADERS are never in $(srcdir) so it
+        # is safe to just put @am__isrc@ right after '-I.', without a
+        # space.
        ($default_includes = ' ' . uniq (@incs)) =~ s/ @/@/;
       }
 
@@ -3992,15 +3993,10 @@ sub handle_configure ($$$@)
                                  FILES => "@distclean_config")
     if @distclean_config;
 
-  reject_var ('CONFIG_HEADER',
-             "'CONFIG_HEADER' is an anachronism; now determined "
-             . "automatically\nfrom '$configure_ac'");
-
   my @config_h;
   foreach my $spec (@config_headers)
     {
       my ($out, @ins) = split_config_file_spec ($spec);
-      # Generate CONFIG_HEADER define.
       if ($relative_dir eq dirname ($out))
        {
          push @config_h, basename ($out);
@@ -4010,7 +4006,7 @@ sub handle_configure ($$$@)
          push @config_h, "\$(top_builddir)/$out";
        }
     }
-  define_variable ("CONFIG_HEADER", "@config_h", INTERNAL)
+  define_variable ("AM_CONFIG_HEADERS", "@config_h", INTERNAL)
     if @config_h;
 
   # Now look for other files in this directory which must be remade
index 61e32be04dfb337cd6c84c347069e28f632d30aa..e4928e8067c6f31defafb90c4e03243fefa428e8 100644 (file)
@@ -15,7 +15,7 @@
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 %CONFIG_H%: %STAMP%
-## Recover from removal of CONFIG_HEADER.  Break up in two invocations
+## Recover from removal of config headers.  Break up in two invocations
 ## so that "make -n" is properly honored.
        @test -f $@ || rm -f %STAMP%
        @test -f $@ || $(MAKE) %STAMP%
index b34a35d07437dff5dacce924e7895ad0e45d6dcb..dd8d00bc4c3826fd76def3a042b141fa3e299f5d 100644 (file)
@@ -324,8 +324,9 @@ modern.DIST_SOURCES = am__dist_sources
 modern.am__TEST_BASES = am__test_bases
 modern.am__TEST_LOGS = am__test_logs
 modern.am__TEST_RESULTS = am__test_results
+modern.CONFIG_HEADER = AM_CONFIG_HEADERS
 
-sc_renamed_variables_rules = \
+Sc_renamed_variables_rules = \
   $(patsubst modern.%,sc_no_%,$(filter modern.%,$(.VARIABLES)))
 
 $(sc_renamed_variables_rules): sc_no_% :