AM_INIT_AUTOMAKE: allow obsolescent two-args invocation once again
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 24 Aug 2012 08:47:17 +0000 (10:47 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 24 Aug 2012 09:42:41 +0000 (11:42 +0200)
commit2abe18335cffce365cbe09bdc1d0315f5ed8f24d
treeb12884139c48a64958446b165b7fcf33dc9174ff
parentc6cc38027572445a25d749db99473f82521cc79e
AM_INIT_AUTOMAKE: allow obsolescent two-args invocation once again

This partially reverts commit 'v1.12-67-ge186355' of 2012-05-25,
"init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore"

Some users still need to be able to define the version number for
their package dynamically, at configure runtime.

Their user case is that, for development snapshots, they want to be
able to base the complete version of the package on the VCS revision
ID (mostly Git or Mercurial).  They could of course do so by
specifying such version dynamically in their call to AC_INIT, as is
done by several GNU packages.  But then they would need to regenerate
and re-run the configure script before each snapshot, which might be
very time-consuming for complex packages, to the point of slowing
down and even somewhat impeding development.

The situation should truly be solved in Autoconf, by allowing a way
to specify the version dynamically in a way that doesn't force the
configure script to be regenerated and re-run every time the package
version changes.  But until Autoconf has been improved to allow
this, Automake will have to support the obsolescent two-arguments
invocation for AM_INIT_AUTOMAKE, to avoid regressing the suboptimal
but working solution for the use case described above.

See also:
<http://lists.gnu.org/archive/html/automake/2012-08/msg00025.html>

* NEWS: Update.
* m4/init.m4 (AM_INIT_AUTOMAKE): Support once again invocation with
two or three arguments.
* t/aminit-moreargs-no-more.sh: Renamed ...
* t/aminit-moreargs-deprecated.sh: ... like this, and updated.
* t/nodef.sh: Recovered test, with minor adjustments.
* t/backcompat.sh: Likewise.
* t/backcompat2.sh: Likewise.
* t/backcompat3.sh: Likewise.
* t/backcompat6.sh: Likewise.
* t/list-of-tests.mk: Adjust.

Suggested-by: Bob Friesenhahn n<bfriesen@simple.dallas.tx.us>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NEWS
m4/init.m4
t/aminit-moreargs-deprecation.sh [moved from t/aminit-moreargs-no-more.sh with 73% similarity]
t/backcompat.sh [new file with mode: 0755]
t/backcompat2.sh [new file with mode: 0755]
t/backcompat3.sh [new file with mode: 0755]
t/backcompat6.sh [new file with mode: 0755]
t/list-of-tests.mk
t/nodef.sh [new file with mode: 0755]