From: Stefano Lattarini Date: Sun, 20 May 2012 15:09:31 +0000 (+0200) Subject: [ng] config.h.{bot,top}: don't support anymore (distribution and deps) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48b6805c685224c90aae0dbff9f88c4b63ec3eb5;p=thirdparty%2Fautomake.git [ng] config.h.{bot,top}: don't support anymore (distribution and deps) 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 . * 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 --- diff --git a/NG-NEWS b/NG-NEWS index 30711f600..73c4f759b 100644 --- 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"). ----- diff --git a/automake.in b/automake.in index a0be09c11..6c840a359 100644 --- a/automake.in +++ b/automake.in @@ -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", diff --git a/lib/am/remake-hdr.am b/lib/am/remake-hdr.am index 7c214b893..a3b54a81a 100644 --- a/lib/am/remake-hdr.am +++ b/lib/am/remake-hdr.am @@ -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 index 798284ae6..000000000 --- a/t/autodist-config-headers.sh +++ /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 . - -# 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 < 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 - -: