[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.12-66-g2
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.12-66-g27136df |
Date: |
Sun, 06 May 2012 10:05:28 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=27136dfe02926ac596c853fced7c17825ef3cf68
The branch, maint has been updated
via 27136dfe02926ac596c853fced7c17825ef3cf68 (commit)
from 37267407001d025b48648c4fbcf5b3f16072fcc1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 27136dfe02926ac596c853fced7c17825ef3cf68
Author: Stefano Lattarini <address@hidden>
Date: Sat Mar 31 16:39:32 2012 +0200
init: warn against obsolete usage of AM_INIT_AUTOMAKE
Support for the two- and three-arguments invocation forms of the
AM_INIT_AUTOMAKE macro, as in:
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
or:
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, NODEFINE)
will be removed in the next major Automake release (1.13).
Such usages have already been deprecated in the documentation
starting from commit v1.11-2015-ge99690a of 23-02-2012 "docs,
news: document planned removal of obsolete macros and features".
We now start giving runtime warnings as well (in the 'obsolete'
category).
* NEWS: Update.
* m4/init.m4 (AM_INIT_AUTOMAKE): Report the two- and three-arguments
form invocation.
* automake.in (scan_autoconf_traces): Likewise.
* doc/automake.texi: Minor adjustments. Add an @anchor to the
location where it's described how to modernize outdated invocation
of AM_INIT_AUTOMAKE, so that it can be referenced from automake
warning/error messages.
* t/aminit-moreargs-deprecation.sh: New test.
* tests/list-of-tests.mk: Add it.
* tests/ac-output-old.tap: Adjust by calling automake with the
warnings in the 'obsolete' category disabled.
* t/backcompat.test: Likewise.
* t/backcompat3.test: Likewise.
* t/backcompat5.test: Likewise.
* t/backcompat6.test: Likewise.
* t/version.test: Likewise.
* t/version2.test: Likewise.
* t/pr2.test: Modernize style of AC_INIT and AM_INIT_AUTOMAKE
invocations, and use proper m4 quoting.
* t/pr87.test: Likewise.
* t/confsub.test: Likewise.
* t/install2.test: Likewise.
Signed-off-by: Stefano Lattarini <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
NEWS | 5 ++
automake.in | 4 ++
doc/automake.texi | 3 +-
m4/init.m4 | 5 ++-
t/ac-output-old.tap | 2 +
...precation.sh => aminit-moreargs-deprecation.sh} | 45 ++++++++++---------
t/backcompat.sh | 2 +-
t/backcompat3.sh | 2 +
t/backcompat5.sh | 4 +-
t/backcompat6.sh | 2 +-
t/confsub.sh | 9 ++--
t/install2.sh | 12 +++--
t/list-of-tests.mk | 1 +
t/pr2.sh | 9 +---
t/pr87.sh | 14 ++++--
t/version.sh | 2 +-
t/version2.sh | 2 +-
17 files changed, 73 insertions(+), 50 deletions(-)
copy t/{mkdirp-deprecation.sh => aminit-moreargs-deprecation.sh} (50%)
diff --git a/NEWS b/NEWS
index dcfd8c1..57af901 100644
--- a/NEWS
+++ b/NEWS
@@ -56,6 +56,11 @@ New in 1.12.1:
* Deprecated obsolescent features:
+ - Use of the long-deprecated two- and three-arguments invocation forms
+ of the AM_INIT_AUTOMAKE macro now elicits a warning in the 'obsolete'
+ category. Starting from the next major Automake release (1.13), such
+ usages won't be allowed anymore.
+
- Support for the "Cygnus-style" trees (enabled by the 'cygnus' option) is
now deprecated (its use triggers a warning in the 'obsolete' category).
It will be removed in the next major Automake release (1.13).
diff --git a/automake.in b/automake.in
index 16f44b7..5cf5a2c 100644
--- a/automake.in
+++ b/automake.in
@@ -5409,6 +5409,10 @@ EOF
$seen_init_automake = $where;
if (defined $args[2])
{
+ msg 'obsolete', $where, <<'EOF';
+AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more
info, see:
+http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation
+EOF
$package_version = $args[2];
$package_version_location = $where;
}
diff --git a/doc/automake.texi b/doc/automake.texi
index 5e2b9c2..2f2ebb0 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -3946,13 +3946,14 @@ each option were listed in @code{AUTOMAKE_OPTIONS}
(@pxref{Options}).
@acindex AC_INIT
This macro can also be called in @emph{another, deprecated form} (support
-for which will be @emph{removed in the next major Automake release}):
+for which will be @emph{removed in the next major Automake release (1.13)}):
@code{AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])}. In this form,
there are two required arguments: the package and the version number.
This form is obsolete because the @var{package} and @var{version} can
be obtained from Autoconf's @code{AC_INIT} macro (which itself has an
old and a new form).
address@hidden AM_INIT_AUTOMAKE invocation}
If your @file{configure.ac} has:
@example
diff --git a/m4/init.m4 b/m4/init.m4
index 206034c..85228ba 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -52,7 +52,10 @@ AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[AC_DIAGNOSE([obsolete],
+[$0: two- and three-arguments forms are deprecated. For more info, see:
+http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
diff --git a/t/ac-output-old.tap b/t/ac-output-old.tap
index 5c906a2..5ba3d3e 100755
--- a/t/ac-output-old.tap
+++ b/t/ac-output-old.tap
@@ -24,6 +24,8 @@ plan_ 22
rm -f configure.ac depcomp # Not required.
+AUTOMAKE="$AUTOMAKE -Wno-obsolete"
+
# -----------------------------------------------------------------------
# Test for bug reported by François Pinard.
diff --git a/t/mkdirp-deprecation.sh b/t/aminit-moreargs-deprecation.sh
similarity index 50%
copy from t/mkdirp-deprecation.sh
copy to t/aminit-moreargs-deprecation.sh
index 7b8f67f..ac91d1d 100755
--- a/t/mkdirp-deprecation.sh
+++ b/t/aminit-moreargs-deprecation.sh
@@ -14,35 +14,38 @@
# 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 the AM_PROG_MKDIR_P macro is deprecated. It will be
-# be removed in the next major Automake release.
+# Check that automake warns against old-style usages of AM_INIT_AUTOMAKE
+# (i.e., calls with two or three arguments).
. ./defs || Exit 1
-echo AM_PROG_MKDIR_P >> configure.ac
-: > Makefile.am
+warn_rx='AM_INIT_AUTOMAKE.* two-.* three-arguments form.*deprecated'
-grep_err ()
-{
- loc='^configure.ac:4:'
- grep "$loc.*AM_PROG_MKDIR_P.*deprecated" stderr
- grep "$loc.* use .*AC_PROG_MKDIR_P" stderr
- grep "$loc.* use '\$(MKDIR_P)' instead of '\$(mkdir_p)'.*Makefile" stderr
-}
+cat > configure.ac <<'END'
+AC_INIT([Makefile.am])
+AM_INIT_AUTOMAKE([twoargs], [1.0])
+AC_CONFIG_FILES([Makefile])
+END
$ACLOCAL
-$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep_err
-
-$AUTOCONF -Werror -Wno-obsolete
+do_check()
+{
+ rm -rf autom4te*.cache
+ for cmd in "$AUTOCONF" "$AUTOMAKE"; do
+ $cmd -Werror -Wnone -Wobsolete 2>stderr && { cat stderr; Exit 1; }
+ cat stderr >&2
+ grep "^configure\.ac:2:.*$warn_rx" stderr
+ $cmd -Werror -Wall -Wno-obsolete || Exit 1
+ done
+}
-#AUTOMAKE_fails
-#grep_err
-AUTOMAKE_fails --verbose -Wnone -Wobsolete
-grep_err
+: > Makefile.am
+do_check
-$AUTOMAKE -Wno-obsolete
+sed "/^AM_INIT_AUTOMAKE/s|)$|, [NODEFINE])|" configure.ac > t
+diff configure.ac t && fatal_ "failed to edit configure.ac"
+mv -f t configure.ac
+do_check
:
diff --git a/t/backcompat.sh b/t/backcompat.sh
index ec8292c..8a93141 100755
--- a/t/backcompat.sh
+++ b/t/backcompat.sh
@@ -55,7 +55,7 @@ END
cat configure.in # For debugging.
$ACLOCAL
$AUTOCONF
- $AUTOMAKE
+ $AUTOMAKE -Wno-obsolete
./configure
$MAKE test
done
diff --git a/t/backcompat3.sh b/t/backcompat3.sh
index 2377e88..5dc78f6 100755
--- a/t/backcompat3.sh
+++ b/t/backcompat3.sh
@@ -22,6 +22,8 @@ am_create_testdir=empty
empty=''
+AUTOMAKE="$AUTOMAKE -Wno-obsolete"
+
cat > Makefile.am <<'END'
## Leading ':;' here required to work around bugs of (at least) bash 3.2
got: Makefile
diff --git a/t/backcompat5.sh b/t/backcompat5.sh
index 3aa9067..6bfb1c2 100755
--- a/t/backcompat5.sh
+++ b/t/backcompat5.sh
@@ -94,10 +94,10 @@ END
$ACLOCAL
$AUTOCONF
-$AUTOMAKE -a
+$AUTOMAKE -a -Wno-obsolete
test -f install-sh
for f in $makefiles; do mv -f $f.in $f.sav; done
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
for f in $makefiles; do diff $f.sav $f.in; done
./configure
diff --git a/t/backcompat6.sh b/t/backcompat6.sh
index fde118b..4523a65 100755
--- a/t/backcompat6.sh
+++ b/t/backcompat6.sh
@@ -78,7 +78,7 @@ int main (void)
END
$ACLOCAL
-$AUTOMAKE --add-missing
+$AUTOMAKE -Wno-obsolete --add-missing
$AUTOCONF
./configure
diff --git a/t/confsub.sh b/t/confsub.sh
index 1887046..b13f26a 100755
--- a/t/confsub.sh
+++ b/t/confsub.sh
@@ -19,11 +19,10 @@
. ./defs || Exit 1
-cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(subdir/config.h:subdir/config.hin)
-AC_OUTPUT(Makefile subdir/Makefile)
+cat >> configure.ac << 'END'
+AC_CONFIG_FILES([subdir/Makefile])
+AM_CONFIG_HEADER([subdir/config.h:subdir/config.hin])
+AC_OUTPUT
END
cat > Makefile.am << 'END'
diff --git a/t/install2.sh b/t/install2.sh
index f1992e8..bd400f4 100755
--- a/t/install2.sh
+++ b/t/install2.sh
@@ -17,14 +17,16 @@
# Test for bug in 'make dist'
# From Pavel Roskin.
+am_create_testdir=empty
. ./defs || Exit 1
-cat > configure.ac << 'END'
-AC_INIT
+cat > configure.ac << END
+AC_INIT([$me], [1.0])
dnl Prevent automake from looking in .. and ../..
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(foo, 0.1)
-AC_OUTPUT(Makefile)
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
END
cat > Makefile.am << 'END'
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 708e972..e9f8d23 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -117,6 +117,7 @@ t/alpha2.sh \
t/amhello-cflags.sh \
t/amhello-cross-compile.sh \
t/amhello-binpkg.sh \
+t/aminit-moreargs-deprecation.sh \
t/amassign.sh \
t/ammissing.sh \
t/amopt.sh \
diff --git a/t/pr2.sh b/t/pr2.sh
index ffe4a81..9aa7bc5 100755
--- a/t/pr2.sh
+++ b/t/pr2.sh
@@ -29,11 +29,8 @@
. ./defs || Exit 1
-# Please keep this underquoted and old-style.
-cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(README.foo:templ/README.foo.in Makefile)
+cat >> configure.ac << 'END'
+AC_OUTPUT([README.foo:templ/README.foo.in])
END
: > Makefile.am
@@ -46,6 +43,6 @@ $AUTOCONF
$AUTOMAKE
./configure
$MAKE distdir
-test -f nonesuch-nonesuch/templ/README.foo.in
+test -f $distdir/templ/README.foo.in
:
diff --git a/t/pr87.sh b/t/pr87.sh
index d98b661..121328d 100755
--- a/t/pr87.sh
+++ b/t/pr87.sh
@@ -37,12 +37,16 @@ EOF
done
echo "SUBDIRS = $subdirs" > Makefile.am
-cat >configure.ac <<EOF
-AC_INIT(`echo $subdirs | sed 's|\([a-z][a-z]*\).*|\1/\1.c|'`)
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE($me, 1.0)
+
+cat > configure.ac <<EOF
+AC_INIT([$me], [1.0])
+AC_CONFIG_SRCDIR([foo/foo.c])
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
AC_PROG_CC
-AC_OUTPUT(Makefile `echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`)
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([`echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`])
+AC_OUTPUT
EOF
mkdir build
diff --git a/t/version.sh b/t/version.sh
index 98664e2..431eb0d 100755
--- a/t/version.sh
+++ b/t/version.sh
@@ -38,4 +38,4 @@ END
: > THANKS
$ACLOCAL
-$AUTOMAKE --gnits
+$AUTOMAKE --gnits -Wno-obsolete
diff --git a/t/version2.sh b/t/version2.sh
index 71749f6..273bd36 100755
--- a/t/version2.sh
+++ b/t/version2.sh
@@ -38,4 +38,4 @@ END
: > THANKS
$ACLOCAL
-$AUTOMAKE --gnits
+$AUTOMAKE --gnits -Wno-obsolete
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.12-66-g27136df,
Stefano Lattarini <=