summaryrefslogtreecommitdiff
path: root/m4/init.m4
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-03-31 16:39:32 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-05-06 11:30:16 +0200
commit27136dfe02926ac596c853fced7c17825ef3cf68 (patch)
treedb64caeb4199554fcf71a262dba4c7be2e1f32c0 /m4/init.m4
parent37267407001d025b48648c4fbcf5b3f16072fcc1 (diff)
downloadautomake-27136dfe02926ac596c853fced7c17825ef3cf68.tar.gz
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 <stefano.lattarini@gmail.com>
Diffstat (limited to 'm4/init.m4')
-rw-r--r--m4/init.m45
1 files changed, 4 insertions, 1 deletions
diff --git a/m4/init.m4 b/m4/init.m4
index 206034c54..85228ba8c 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