]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] config.h.{bot,top}: don't support anymore (distribution and deps)
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 20 May 2012 15:09:31 +0000 (17:09 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 21 May 2012 07:25:44 +0000 (09:25 +0200)
The use of those files have been obsoleted since Autoconf commit 5047ea80
of 1994-08-09, "support alternate input file names"; yes, the "1994" in
there is not a typo: those files were already deprecated in Autoconf 2.0.
It's well past time to remove support for them!

For more information, see chapter "Obsolete Constructs", section
"acconfig.h" of the Autoconf manual.  See also the discussion on automake
bug#7919, in particular the message <http://debbugs.gnu.org/7819#20>.

* NG-NEWS: Update.
* automake.in (handle_configure): Don't automatically distribute the
'config.h.top' and 'config.h.bot' files if they exist, and don't add
them to the '%FILES%' transform when processing the 'remake-hdr.am'
Makefile fragment.  In fact, drop the '%FILES%' transform altogether,
since now it would always expand to empty.
(@common_sometimes): Don't list 'config.h.top' and 'config.h.bot'
anymore.
* lib/am/remake-hdr.am (%CONFIG_HIN%): Don't depend on '%FILES%'
anymore.  That transform has been removed now (and wouldn't be needed
anyway).
* t/autodist-config-headers.sh: Remove as obsolete.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NG-NEWS
automake.in
lib/am/remake-hdr.am
t/autodist-config-headers.sh [deleted file]

diff --git a/NG-NEWS b/NG-NEWS
index 30711f600aa20d09ce9ee5fd864676819c95c7f2..73c4f759b43e17b2bec326f2799f9bb82df696b2 100644 (file)
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -201,8 +201,10 @@ Miscellaneous
   possible default sources.
 
 * Automake-NG has removed automatic handling and distribution of the
-  obsolescent 'acconfig.h' file.  One should instead use the modern macros
-  'AH_VERBATIM' and 'AH_TEMPLATE', as recommended in the Autoconf manual.
+  obsolescent 'acconfig.h', 'config.h.top' and 'config.h.bot' files.
+  One should instead use the modern macros 'AH_VERBATIM' and 'AH_TEMPLATE',
+  as recommended in the Autoconf manual (as of Autoconf 2.69, chapter
+  "Obsolete Constructs", section "acconfig.h").
 
 -----
 
index a0be09c110bd7f190457bb434923c340e84429ce..6c840a3596db0e6c32c2c2c20d05bcc43754b859 100644 (file)
@@ -4018,24 +4018,10 @@ sub handle_configure ($$$@)
          # Cannot define rebuild rules for filenames with shell variables.
          next if (substitute_ac_subst_variables $config_h_path) =~ /\$/;
 
-         # Header defined in this directory.
-         my @files;
-         if (-f $config_h_path . '.top')
-           {
-             push (@files, "$cn_sans_dir.top");
-           }
-         if (-f $config_h_path . '.bot')
-           {
-             push (@files, "$cn_sans_dir.bot");
-           }
-
-         push_dist_common (@files);
-
          my $stamp = "${stamp_dir}stamp-h${hdr_index}";
          $output_rules .=
            file_contents ('remake-hdr',
                           new Automake::Location,
-                          FILES            => "@files",
                           CONFIG_H         => $cn_sans_dir,
                           CONFIG_HIN       => $ins[0],
                           CONFIG_H_DEPS    => "@ins",
index 7c214b893fb0467f6ceb135c76e99c06681cf3a4..a3b54a81ac87e697078653def8c96f2cb4cdce7e 100644 (file)
@@ -31,7 +31,7 @@
 ## Only the first file of AC_CONFIG_HEADERS is assumed to be generated
 ## by autoheader.
 if %?FIRST%
-%CONFIG_HIN%: %MAINTAINER-MODE% $(am__configure_deps) %FILES%
+%CONFIG_HIN%: %MAINTAINER-MODE% $(am__configure_deps)
 ## Cater to parallel BSD make.
        ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
 ## Whenever $(AUTOHEADER) has run, we must make sure that
diff --git a/t/autodist-config-headers.sh b/t/autodist-config-headers.sh
deleted file mode 100755 (executable)
index 798284a..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program 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 2, or (at your option)
-# any later version.
-#
-# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check that config.h.bot and config.h.top are automatically
-# distributed if the AC_CONFIG_HADERS macro is used and they
-# exist at automake runtime.
-# Related to automake bug#7819.
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<END
-AC_CONFIG_HEADERS([config.h sub/config.h cfg2.h:conf2.hin])
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-.PHONY: test
-test: distdir
-       ls -l $(distdir) $(distdir)/sub
-       echo ' ' $(am__dist_common) ' ' | grep '[ /]config\.h\.bot '
-       echo ' ' $(am__dist_common) ' ' | grep '[ /]config\.h\.top '
-       echo ' ' $(am__dist_common) ' ' | grep '[ /]cfg2\.h\.bot '
-       echo ' ' $(am__dist_common) ' ' | grep '[ /]cfg2\.h\.top '
-       echo ' ' $(am__dist_common) ' ' | grep '[ /]sub/config\.h\.bot '
-       echo ' ' $(am__dist_common) ' ' | grep '[ /]sub/config\.h\.top '
-       test -f $(distdir)/config.h.bot
-       test -f $(distdir)/config.h.top
-       test -f $(distdir)/cfg2.h.bot
-       test -f $(distdir)/cfg2.h.top
-       test -f $(distdir)/sub/config.h.bot
-       test -f $(distdir)/sub/config.h.top
-END
-
-mkdir sub
-touch config.h.in config.h.top config.h.bot \
-      conf2.hin cfg2.h.top cfg2.h.bot \
-      sub/config.h.in sub/config.h.top sub/config.h.bot
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-
-./configure
-$MAKE test
-
-: