automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [PATCH 1/4] [ng] cleanup: don't support configure.in anymo


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH 1/4] [ng] cleanup: don't support configure.in anymore
Date: Fri, 25 May 2012 17:50:59 +0200

The autoconf input should be named 'configure.ac' instead.  The use
of 'configure.in' has been deprecated in Autoconf since at least
the 2.13 -> 2.50 transition, and future Autoconf versions (starting
with 2.70 probably) will start to warn about it at runtime.

* lib/Automake/Configure_ac.pm (find_configure_ac): Don't look for
configure.in if configure.ac is not found.
(require_configure_ac): On failure, don't tell that "'configure.ac'
or 'configure.in' is required", but just that "'configure.ac' is
required".
* automake.in (@common_sometimes): Don't list 'configure.in'.
(scan_autoconf_files): Adjust heading comments.
* NG-NEWS: Update.
* t/help.sh: Adjust.
* t/configure.sh: Adjust as obsolete.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 NG-NEWS                      |    3 +++
 automake.in                  |    2 --
 lib/Automake/Configure_ac.pm |   24 ++-----------------
 t/configure.sh               |   54 ------------------------------------------
 t/help.sh                    |    2 --
 5 files changed, 5 insertions(+), 80 deletions(-)
 delete mode 100755 t/configure.sh

diff --git a/NG-NEWS b/NG-NEWS
index 1bca493..216c95b 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -228,6 +228,9 @@ Distribution
 Obsolete Features Removed
 =========================
 
+* Support for the long-deprecated name 'configure.in' for the Autoconf
+  input file (instead of the modern 'configure.ac') has been deprecated.
+
 * If the sources for a target library like 'libfoo.a' or 'libbar.la' are
   not explicitly specified, mainline Automake looks also (respectively)
   for the files 'libfoo_a.c' or 'libbar_la.c' as possible default sources.
diff --git a/automake.in b/automake.in
index 0c3fe22..cf1385f 100644
--- a/automake.in
+++ b/automake.in
@@ -265,7 +265,6 @@ my @common_sometimes =
     aclocal.m4
     configure
     configure.ac
-    configure.in
     stamp-vti
   );
 
@@ -5034,7 +5033,6 @@ EOF
 
 # &scan_autoconf_files ()
 # -----------------------
-# Check whether we use 'configure.ac' or 'configure.in'.
 # Scan it (and possibly 'aclocal.m4') for interesting things.
 # We must scan aclocal.m4 because there might be AC_SUBSTs and such there.
 sub scan_autoconf_files ()
diff --git a/lib/Automake/Configure_ac.pm b/lib/Automake/Configure_ac.pm
index 53e62a5..e53913a 100644
--- a/lib/Automake/Configure_ac.pm
+++ b/lib/Automake/Configure_ac.pm
@@ -70,26 +70,7 @@ sub find_configure_ac (;@)
 {
   my ($directory) = @_;
   $directory ||= '.';
-  my $configure_ac =
-    File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.ac'));
-  my $configure_in =
-    File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.in'));
-
-  if (-f $configure_ac)
-    {
-      if (-f $configure_in)
-       {
-         msg ('unsupported',
-              "'$configure_ac' and '$configure_in' both present.\n"
-              . "proceeding with '$configure_ac'");
-       }
-      return $configure_ac
-    }
-  elsif (-f $configure_in)
-    {
-      return $configure_in;
-    }
-  return $configure_ac;
+  return File::Spec->canonpath (File::Spec->catfile ($directory, 
'configure.ac'));
 }
 
 
@@ -102,8 +83,7 @@ Like C<find_configure_ac>, but fail if neither is present.
 sub require_configure_ac (;$)
 {
   my $res = find_configure_ac (@_);
-  fatal "'configure.ac' or 'configure.in' is required"
-    unless -f $res;
+  fatal "'configure.ac' is required" unless -f $res;
   return $res
 }
 
diff --git a/t/configure.sh b/t/configure.sh
deleted file mode 100755
index cedba55..0000000
--- a/t/configure.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-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/>.
-
-# Diagnose if both configure.in and configure.ac are present, prefer
-# configure.ac.
-
-. ./defs || Exit 1
-
-cat >configure.ac <<EOF
-AC_INIT([$me], [1.0])
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([Makefile])
-EOF
-
-cat >configure.in <<EOF
-AC_INIT([$me], [1.0])
-AM_INIT_AUTOMAKE([an-invalid-automake-option])
-AC_CONFIG_FILES([Makefile])
-EOF
-
-: >Makefile.am
-
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'configure\.ac.*configure\.in.*both present' stderr
-
-$ACLOCAL -Wno-error 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'configure\.ac.*configure\.in.*both present' stderr
-grep 'proceeding.*configure\.ac' stderr
-
-# Ensure we really proceed with configure.ac.
-AUTOMAKE_fails -Werror
-grep 'configure\.ac.*configure\.in.*both present' stderr
-grep 'proceeding.*configure\.ac' stderr
-
-AUTOMAKE_run -Wno-error
-grep 'configure\.ac.*configure\.in.*both present' stderr
-grep 'proceeding.*configure\.ac' stderr
-
-:
diff --git a/t/help.sh b/t/help.sh
index 2f7c2d1..ae91877 100755
--- a/t/help.sh
+++ b/t/help.sh
@@ -38,9 +38,7 @@ $AUTOMAKE --help
 $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 $FGREP configure.ac stderr
-$FGREP configure.in stderr
 AUTOMAKE_fails
 $FGREP configure.ac stderr
-$FGREP configure.in stderr
 
 :
-- 
1.7.9.5




reply via email to

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