diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-05-19 11:47:26 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-05-25 14:46:05 +0200 |
commit | e186355f246be84a48c1113dc528d689c1d4b717 (patch) | |
tree | bf8b7739b69570b68902ef3eec05ec66041bd6d3 /m4 | |
parent | 27136dfe02926ac596c853fced7c17825ef3cf68 (diff) | |
download | automake-e186355f246be84a48c1113dc528d689c1d4b717.tar.gz |
init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore
This is a follow-up on commit v1.12-66-g27136df of 2012-05-06, "init: warn
against obsolete usage of AM_INIT_AUTOMAKE".
With this change, we drop support for the two-arguments and three-arguments
invocation forms of the AM_INIT_AUTOMAKE macro, as in either of:
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, NODEFINE)
* NEWS, doc/automake.texi: Update.
* m4/init.m4 (AM_INIT_AUTOMAKE): Report the two- and three-arguments
invocation form as a hard error.
* t/aminit-moreargs-deprecation.sh: Renamed ...
* t/aminit-moreargs-deprecation.sh: ... to this, and updated to check
the new semantics.
* t/ac-output-old.tap: Adjust by avoiding old-style uses of AC_INIT
and AM_INIT_AUTOMAKE.
* t/acsilent.sh: Likewise.
* t/dirlist.sh: Likewise.
* t/dirlist2.sh: Likewise.
* t/req.sh: Likewise.
* t/nodef.sh: Remove as obsolete.
* t/version.sh: Likewise.
* t/version2.sh: Likewise.
* t/backcompat.sh: Likewise.
* t/backcompat2.sh: Likewise.
* t/backcompat3.sh: Likewise.
* t/backcompat5.sh: Likewise.
* t/backcompat4.sh: Renamed ...
* t/backcompat-acout.sh: ... to this.
* t/list-of-tests.mk: Adjust.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/init.m4 | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/m4/init.m4 b/m4/init.m4 index 85228ba8c..151a59c62 100644 --- a/m4/init.m4 +++ b/m4/init.m4 @@ -6,22 +6,13 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 19 +# serial 20 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. +# --------------------------- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow @@ -50,22 +41,18 @@ fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[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 +dnl Error out on old-style AM_INIT_AUTOMAKE calls. +m4_ifval([$2], [m4_fatal( +[$0: old-style two- and three-arguments forms are now unsupported. For more info: +http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])]) +_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) |