diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-05-25 17:50:59 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-05-26 10:22:47 +0200 |
commit | 927d4cb1207afc2e7435053d1b77e682b6d11b60 (patch) | |
tree | aa6c19e43f0008cc63e83e417c46260d6f5a7bed | |
parent | 92d305960d83749239dae4579bfb46fb08ae6c23 (diff) | |
download | automake-927d4cb1207afc2e7435053d1b77e682b6d11b60.tar.gz |
cleanup: don't support configure.in anymore
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 <stefano.lattarini@gmail.com>
-rw-r--r-- | NG-NEWS | 3 | ||||
-rw-r--r-- | automake.in | 2 | ||||
-rw-r--r-- | lib/Automake/Configure_ac.pm | 24 | ||||
-rwxr-xr-x | t/configure.sh | 54 | ||||
-rwxr-xr-x | t/help.sh | 2 |
5 files changed, 5 insertions, 80 deletions
@@ -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 0c3fe22e8..cf1385f16 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 53e62a572..e53913a5c 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 cedba5505..000000000 --- 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 - -: @@ -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 : |