automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-NG] [PATCH 07/12] [ng] acconfig.h: don't support anymore (dist


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH 07/12] [ng] acconfig.h: don't support anymore (distribution and dependencies)
Date: Mon, 21 May 2012 09:36:24 +0200

Support for acconfig.h is still present in Autoconf (version 2.69 at the
time of writing), but deprecated by a long time in favour of AH_VERBATIM
and AH_TEMPLATE.  The deprecation started at least in September 1999 (see
Changelog entry "Start to get rid of acconfig.h.  It is an anachronism",
dated 1999-09-28), and was basically completed by October 1999 (see the
ChangeLog entry "Moving most of the task of creating config.h.in from sh
to m4", dated 1999-10-01), i.e., before the Autoconf 2.50 release (dated
2001-05-21).

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>.

* automake.in (handle_configure): Don't automatically distribute the
'acconfig.h' file if it exists, and don't add it to the transform
'%FILES%' when processing the 'remake-hdr.am' Makefile fragment.
(@common_sometimes): Don't list 'acconfig.h' anymore.  Reformat it
while we are at it, to make it easier to add or remove entries in
the future.
* t/autodist-acconfig-no-subdir.sh: Remove as obsolete.
* t/autodist-acconfig: Likewise.
* t/confh.sh: Adjust.
* lib/missing (case $program in autoheader*)): Remove any mention
of 'acconfig.h'.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 NG-NEWS                          |    4 +++
 automake.in                      |   23 ++++++----------
 lib/missing                      |    8 +++---
 t/autodist-acconfig-no-subdir.sh |   56 --------------------------------------
 t/autodist-acconfig.sh           |   44 ------------------------------
 t/confh.sh                       |    5 ++--
 6 files changed, 19 insertions(+), 121 deletions(-)
 delete mode 100755 t/autodist-acconfig-no-subdir.sh
 delete mode 100755 t/autodist-acconfig.sh

diff --git a/NG-NEWS b/NG-NEWS
index 8a9fb9a..30711f6 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -200,6 +200,10 @@ Miscellaneous
   and will only look for (respectively) 'libfoo.c' and 'libbar.c' as
   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.
+
 -----
 
 Copyright (C) 2012 Free Software Foundation, Inc.
diff --git a/automake.in b/automake.in
index d141321..a0be09c 100644
--- a/automake.in
+++ b/automake.in
@@ -238,8 +238,15 @@ my @common_files =
 # Commonly used files we auto-include, but only sometimes.  This list
 # is used for the --help output only.
 my @common_sometimes =
-  qw(aclocal.m4 acconfig.h config.h.top config.h.bot configure
-     configure.ac configure.in stamp-vti);
+  qw(
+    aclocal.m4
+    config.h.top
+    config.h.bot
+    configure
+    configure.ac
+    configure.in
+    stamp-vti
+  );
 
 # Standard directories from the GNU Coding Standards, and additional
 # pkg* directories from Automake.  Stored in a hash for fast member check.
@@ -3969,12 +3976,6 @@ sub handle_configure ($$$@)
      'REGEN-ACLOCAL-M4'    => $regen_aclocal_m4,
      VERBOSE               => verbose_flag ('GEN'));
 
-  if ($relative_dir eq '.')
-    {
-      &push_dist_common ('acconfig.h')
-       if -f 'acconfig.h';
-    }
-
   # If we have a configure header, require it.
   my $hdr_index = 0;
   my @distclean_config;
@@ -4030,12 +4031,6 @@ sub handle_configure ($$$@)
 
          push_dist_common (@files);
 
-         # For now, acconfig.h can only appear in the top srcdir.
-         if (-f 'acconfig.h')
-           {
-             push (@files, '$(top_srcdir)/acconfig.h');
-           }
-
          my $stamp = "${stamp_dir}stamp-h${hdr_index}";
          $output_rules .=
            file_contents ('remake-hdr',
diff --git a/lib/missing b/lib/missing
index 9a55648..b4eb97f 100755
--- a/lib/missing
+++ b/lib/missing
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2012-01-06.18; # UTC
+scriptversion=2012-05-20.14; # UTC
 
 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <address@hidden>, 1996.
@@ -157,9 +157,9 @@ WARNING: '$1' is $msg.  You should only need it if
   autoheader*)
     echo 1>&2 "\
 WARNING: '$1' is $msg.  You should only need it if
-         you modified 'acconfig.h' or '${configure_ac}'.  You might want
-         to install the Autoconf and GNU m4 packages.  Grab them
-         from any GNU archive site."
+         you modified '${configure_ac}'.  You might want to install the
+         Autoconf and GNU m4 packages.  Grab them from any GNU archive
+         site."
     files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' 
${configure_ac}`
     test -z "$files" && files="config.h"
     touch_files=
diff --git a/t/autodist-acconfig-no-subdir.sh b/t/autodist-acconfig-no-subdir.sh
deleted file mode 100755
index 18cd5f4..0000000
--- a/t/autodist-acconfig-no-subdir.sh
+++ /dev/null
@@ -1,56 +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 'acconfig.h' is *not* automatically distributed when
-# placed in a subdirectory.
-# Related to automake bug#7819.
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<END
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-SUBDIRS = sub
-sub/acconfig.h:
-       echo target $@ should not be built >&2; exit 1
-check-local: distdir
-       ls -l $(distdir)/sub
-       test ! -f $(distdir)/sub/acconfig.h
-END
-
-mkdir sub
-
-cat > sub/Makefile.am <<'END'
-acconfig.h:
-       echo target $@ should not be built >&2; exit 1
-check-local:
-       echo $(am__dist_common) $(am__dist_files) \
-          | grep 'acconfig\.h' && exit 1; :
-END
-
-: > sub/acconfig.h
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-
-./configure
-$MAKE check
-
-:
diff --git a/t/autodist-acconfig.sh b/t/autodist-acconfig.sh
deleted file mode 100755
index 55884f7..0000000
--- a/t/autodist-acconfig.sh
+++ /dev/null
@@ -1,44 +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 'acconfig.h' is automatically distributed if it exists
-# (at automake runtime).
-# Related to automake bug#7819.
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<END
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-.PHONY: test
-test: distdir
-       ls -l $(distdir)
-       echo ' ' $(am__dist_common) ' ' | grep '[ /]acconfig\.h '
-       test -f $(distdir)/acconfig.h
-END
-
-: > acconfig.h
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-
-./configure
-$MAKE test
-
-:
diff --git a/t/confh.sh b/t/confh.sh
index 1ba8534..d09e39c 100755
--- a/t/confh.sh
+++ b/t/confh.sh
@@ -28,16 +28,15 @@ cat > Makefile.am << 'END'
 .PHONY: test1 test2
 test1:
        @echo am__dist_common = $(am__dist_common)
-       echo ' ' $(am__dist_common) ' ' | grep '[ /]acconfig\.h '
+       echo ' ' $(am__dist_common) ' ' | grep '[ /]include/config\.h\.in '
 test2: distdir
        ls -l $(distdir)/*
-       test -f $(distdir)/acconfig.h
+       test -f $(distdir)/include/config.h.in
 check-local: test1 test2
 END
 
 mkdir include
 : > include/config.h.in
-: > acconfig.h
 
 # The test used to fail if 'include/Makefile.am' was created (!)
 : > include/Makefile.am
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]