]> git.ipfire.org Git - thirdparty/automake.git/log
thirdparty/automake.git
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Fri, 22 Jun 2012 22:42:06 +0000 (00:42 +0200)] 
Merge branch 'master' into ng/master

* master:
  tests: avoid one last `...` command substitution in 'test-init.sh'
  maintcheck: guard against `...` for command substitution in test cases
  tests: more uses of $(...) over `...` for command substitution
  cosmetics: quote `like this', not 'like this', in a couple of tests
  readme: clarify/extend few entries in 't/README'
  readme: better separation of entries in 't/README'
  readme: subsections "Do" and "Do not" in 't/README' merged
  tests: new requirement 'grep-nonprint'
  cosmetics: fix description of an expected error message in a test
  tests: assume automake quotes 'like this', not `like this'

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 22 Jun 2012 22:16:26 +0000 (00:16 +0200)] 
Merge branch 'maint'

* maint:
  tests: avoid one last `...` command substitution in 'test-init.sh'
  maintcheck: guard against `...` for command substitution in test cases
  tests: more uses of $(...) over `...` for command substitution
  cosmetics: quote `like this', not 'like this', in a couple of tests
  readme: clarify/extend few entries in 't/README'
  readme: better separation of entries in 't/README'
  readme: subsections "Do" and "Do not" in 't/README' merged
  tests: new requirement 'grep-nonprint'
  cosmetics: fix description of an expected error message in a test
  tests: assume automake quotes 'like this', not `like this'

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: avoid one last `...` command substitution in 'test-init.sh'
Stefano Lattarini [Fri, 22 Jun 2012 22:12:08 +0000 (00:12 +0200)] 
tests: avoid one last `...` command substitution in 'test-init.sh'

* t/ax/test-init.sh (me): In the definition of this variable.  This
also shave off a couple of forks, and the need for a sanity check
only required in fringe situations.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomaintcheck: guard against `...` for command substitution in test cases
Stefano Lattarini [Fri, 22 Jun 2012 22:06:10 +0000 (00:06 +0200)] 
maintcheck: guard against `...` for command substitution in test cases

But still allow them in configure.ac, Makefile.am and shell scripts
created or used inside test cases itself, because Autoconf (as of
version 2.69) does not yet ensure that $CONFIG_SHELL will be set to
a proper POSIX shell.

* syntax-checks.mk (sc_tests_command_subst): New check.
(syntax-check_rules): Add it.
* t/tap-global-log.sh: Minimal tweakings to avoid triggering the
new maintainer check.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: more uses of $(...) over `...` for command substitution
Stefano Lattarini [Fri, 22 Jun 2012 21:31:00 +0000 (23:31 +0200)] 
tests: more uses of $(...) over `...` for command substitution

Somehow missed by the previous changes.  No big deal, fix them now.

* t/ax/depcomp.sh: Here.
* t/autodist.sh: And here.
* t/autodist-no-duplicate.sh: And here.
* t/autodist-subdir.sh: Ad here.
* t/remake11.sh t/self-check-me.tap: And here.
* t/perf/testsuite-summary.sh: And here.
* t/perf/testsuite-recheck.sh: And here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocosmetics: quote `like this', not 'like this', in a couple of tests
Stefano Lattarini [Fri, 22 Jun 2012 21:18:54 +0000 (23:18 +0200)] 
cosmetics: quote `like this', not 'like this', in a couple of tests

* t/ansi2knr-no-more.sh: Here.
* t/aclocal-verbose-install.sh: And here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoreadme: clarify/extend few entries in 't/README'
Stefano Lattarini [Fri, 22 Jun 2012 21:14:38 +0000 (23:14 +0200)] 
readme: clarify/extend few entries in 't/README'

* t/README (Writing test cases): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoreadme: better separation of entries in 't/README'
Stefano Lattarini [Fri, 22 Jun 2012 21:06:55 +0000 (23:06 +0200)] 
readme: better separation of entries in 't/README'

* t/README (Writing test cases): Prepend different entries with a '*'
character acting like a bullet in a list.  This make different entries
better separated, visually-wise.  Minor related reformatting.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoreadme: subsections "Do" and "Do not" in 't/README' merged
Stefano Lattarini [Fri, 22 Jun 2012 21:01:37 +0000 (23:01 +0200)] 
readme: subsections "Do" and "Do not" in 't/README' merged

* t/README (Writing test cases): Merge subsections "Do" and "Do not".
The distinction was rather artificial, and more confusing than helpful.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: new requirement 'grep-nonprint'
Stefano Lattarini [Fri, 22 Jun 2012 20:31:35 +0000 (22:31 +0200)] 
tests: new requirement 'grep-nonprint'

* t/ax/test-inist.sh ($esc): New, a literal escape character.
(grep-nonprint): New requirement, check that the grep implementation
available that can handle non-printing characters correctly.
* t/color.sh: Use it instead of hand-rolled equivalent, and do not
(re)define '$esc' explicitly.
* t/color2.sh: Likewise.
* t/tap-color.sh: Likewise.
* t/vtexi4.sh: Likewise.
* t/parallel-tests-no-color-in-log.sh: Likewise.  Also prefer the use
of grep over that of $FGREP, because the new requirement only check
grep, and ensure we only grep non-printing characters from a pipe, to
avoid hitting a BSD grep limitation.
* t/parallel-tests-reset-term.sh: Likewise.
* t/ax/tap-summary-aux.sh: Use '$esc' instead of hard-coding the
literal escape character.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocosmetics: fix description of an expected error message in a test
Stefano Lattarini [Fri, 22 Jun 2012 19:59:26 +0000 (21:59 +0200)] 
cosmetics: fix description of an expected error message in a test

* t/vartypo2.sh: Here.  This reflects the change from `this style'
of quoting to 'this style'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: assume automake quotes 'like this', not `like this'
Stefano Lattarini [Fri, 22 Jun 2012 19:44:15 +0000 (21:44 +0200)] 
tests: assume automake quotes 'like this', not `like this'

* t/add-missing.tap: Here.  This slightly simplifies and/or enhances
some grepping checks on automake diagnostic.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Fri, 22 Jun 2012 18:05:11 +0000 (20:05 +0200)] 
Merge branch 'master' into ng/master

* master:
  tests: prefer using 'is_newest' over 'ls -t' hacks
  tests: implement is_newest as an auxiliary script, not shell function
  tests: fix some spurious failures in VPATH setup
  tests: work in VPATH setup again
  tests: automatic re-execution works for non-POSIX shells too
  tests: use more POSIX shell features our test scripts
  docs: avoid failures with development version of Texinfo (4.13.90)
  typofix: s/test derivers/test drivers/ in check.am comments
  typofix: s/env/even/ in comments in GNUmakefile

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 22 Jun 2012 16:55:01 +0000 (18:55 +0200)] 
Merge branch 'maint'

* maint:
  tests: prefer using 'is_newest' over 'ls -t' hacks
  tests: implement is_newest as an auxiliary script, not shell function
  tests: fix some spurious failures in VPATH setup
  tests: work in VPATH setup again

13 years agotests: prefer using 'is_newest' over 'ls -t' hacks
Stefano Lattarini [Fri, 22 Jun 2012 16:15:21 +0000 (18:15 +0200)] 
tests: prefer using 'is_newest' over 'ls -t' hacks

To verify that a file 'new' is newer than the file 'old', it's much
cleaner to use "is_newest new old" rather than the more clumsy
"ls -t". Adjust several of our tests accordingly.

* syntax-checks.mk (sc_tests_ls_t): New check, guard against uses
of "ls -t" and similar.
(syntax_check_rules): Add it.
* t/maken.sh: Adjust.
* t/autohdr4.sh: Likewise.
* t/extradep2.sh: Likewise.
* t/lex-depend-cxx.sh: Likewise.
* t/extradep.sh: Likewise.
* t/yacc-depend2.sh: Likewise.
* t/yacc-pr204.sh: Likewise.
* t/lex-pr204.sh: Likewise.
* t/yacc8.sh: Likewise.
* t/acloca13.sh: Likewise.
* t/lex-depend.sh: Likewise, and enhance.
* t/acloca14.sh: Likewise.
* t/aclocal7.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: implement is_newest as an auxiliary script, not shell function
Stefano Lattarini [Fri, 22 Jun 2012 14:18:28 +0000 (16:18 +0200)] 
tests: implement is_newest as an auxiliary script, not shell function

This will allow to also use it in the makefile recipes used in our
test cases.

* t/ax/test-init.sh (is_newest): Remove.
* t/ax/is_newest: New script.
* Makefile.am (EXTRA_DIST): Add it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix some spurious failures in VPATH setup
Stefano Lattarini [Fri, 22 Jun 2012 13:34:12 +0000 (15:34 +0200)] 
tests: fix some spurious failures in VPATH setup

* t/self-check-cleanup.tap: No need to copy the 'ax/t/test-init.sh'
file over in our temporary directory.
* t/self-check-reexec.tap: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: work in VPATH setup again
Stefano Lattarini [Fri, 22 Jun 2012 13:14:20 +0000 (15:14 +0200)] 
tests: work in VPATH setup again

* defs: Drop overly paranoid sanity checks that was causing all the tests
to fail spuriously when run in a VPATH setup, with a message like:
"../t/nodef.sh: ./t/ax/test-init.sh: not found in current directory".
Those checks looked for invariants that, even if broken, would still
cause the test to fail very early and with a pretty clear error message
anyway.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 22 Jun 2012 12:52:21 +0000 (14:52 +0200)] 
Merge branch 'maint'

* maint:
  tests: automatic re-execution works for non-POSIX shells too
  tests: use more POSIX shell features our test scripts

+ Extra non-trivial edits:

* t/ax/test-init.sh: Apply the diffs between past versions of
'defs' in maint and in master; i.e., remove handling of $required
entries 'texi2dvi-o' and 'makeinfo-html', and adjust to the fact
that the parallel testsuite harness is now the default.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: automatic re-execution works for non-POSIX shells too
Stefano Lattarini [Fri, 22 Jun 2012 09:40:39 +0000 (11:40 +0200)] 
tests: automatic re-execution works for non-POSIX shells too

Some inferior shells are too greedy in parsing their input.  If a
non-POSIX Bourne shell (like Solaris 10 /bin/sh) was used to launch
one of our test scripts, it would fail unconditionally, because it
unexpectedly saw some (by it) unsupported constructs, notwithstanding
such constructs being placed *after* the code implementing automatic
test re-execution with a better shell.  In conclusion, the shell
bailed out like this:

    $ /bin/sh t/ar.sh
    $ t/ar.sh: syntax error at line 257: `is_newest_files=$' unexpected

By moving all the potentially problematic code in a separate file, to
be sourced only after the code for automatic re-execution with a better
shell, we ensure that inferior shell cannot see such code by mistake.

* defs: All code after automatic shell re-execution moved out ...
* t/ax/test-init.sh: ... to this new file.
* syntax-checks.mk (xdefs): Add it.
* Makefile.am (dist_check_DATA): Add it.  Also move in 'defs' from
a less explicit 'check_DATA' declaration.
(nodist_check_DATA):  Move in 'defs-static' from a less explicit
'check_DATA' declaration.
(check_DATA): Remove.
* t/self-check-sanity.sh: Remove, it was actually too hacky and brittle,
sanity-checking situations we don0t actually care about.
* t/list-of-tests.mk: Adjust.
* t/self-check-explicit-skips.sh: Adjust, and fix a botched heading
comments while we are at it.
* t/self-check-reexec.tap: Adjust.
* t/self-check-cleanup.tap: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: use more POSIX shell features our test scripts
Stefano Lattarini [Thu, 14 Jun 2012 11:13:58 +0000 (13:13 +0200)] 
tests: use more POSIX shell features our test scripts

Since commit 'v1.12-36-g2d68fd9' of 2012-05-07, "configure: search a
sturdy POSIX shell to be used in the testsuite", the shell running
our test script is assured to be a POSIX-conforming shell, so we can
use the more modern and flexible idioms and features that we couldn't
use when we also aimed at compatibility with non-POSIX Bourne shells,
like Solaris /bin/sh.

* t/README: Suggest to use POSIX shell features liberally in test cases,
with possible exception of Makefile recipes and configure shell code.
* Several tests: Adjust to use more POSIX shell features; e.g., $(...)
rather than `...`, $((...)) rather than `expr ...`, "if ! CMD; then ..."
instead of "if CMD; then :; else ...", and so on.
In several places, when using the 'test' built-in, prefer '-eq' over
'=' for numeric comparisons, and prefer "grep -c PATTERN FILE" over
"grep PATTERN FILE | wc -l".
Throw in other low-hanging easy improvements and fixlets while we are
at it.
* t/ax/depcomp.sh, t/ax/tap-summary-aux.sh, t/ax/tap-functions.sh,
defs, defs-static.in: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Thu, 21 Jun 2012 11:15:05 +0000 (13:15 +0200)] 
Merge branch 'maint'

* maint:
  docs: avoid failures with development version of Texinfo (4.13.90)
  typofix: s/test derivers/test drivers/ in check.am comments
  typofix: s/env/even/ in comments in GNUmakefile

13 years agodocs: avoid failures with development version of Texinfo (4.13.90)
Stefano Lattarini [Thu, 21 Jun 2012 11:13:04 +0000 (13:13 +0200)] 
docs: avoid failures with development version of Texinfo (4.13.90)

* doc/automake-history.texi: Use '@item' instead of '@itemx' where
appropriate.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotypofix: s/test derivers/test drivers/ in check.am comments
Stefano Lattarini [Thu, 21 Jun 2012 09:43:54 +0000 (11:43 +0200)] 
typofix: s/test derivers/test drivers/ in check.am comments

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotypofix: s/env/even/ in comments in GNUmakefile
Stefano Lattarini [Wed, 20 Jun 2012 21:32:44 +0000 (23:32 +0200)] 
typofix: s/env/even/ in comments in GNUmakefile

Spotted by Eric Blake.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Wed, 20 Jun 2012 16:50:28 +0000 (18:50 +0200)] 
Merge branch 'master' into ng/master

* master:
  bootstrap: overhaul and improve
  docs: quote 'like this', not `like this'
  fixup: tests: special requirement 'makeinfo-html' removed from ./defs

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Wed, 20 Jun 2012 16:35:57 +0000 (18:35 +0200)] 
Merge branch 'maint'

* maint:
  bootstrap: overhaul and improve
  docs: quote 'like this', not `like this'

13 years agobootstrap: overhaul and improve
Stefano Lattarini [Wed, 20 Jun 2012 16:28:02 +0000 (18:28 +0200)] 
bootstrap: overhaul and improve

This fixes several weaknesses and buglets in the 'bootstrap' convenience
target offered in GNUmakefile (and its supporting code).  Refer to the
extensive code comments in there for more details.

* GNUmakefile: Almost completely rewritten.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agodocs: quote 'like this', not `like this'
Stefano Lattarini [Wed, 20 Jun 2012 15:27:57 +0000 (17:27 +0200)] 
docs: quote 'like this', not `like this'

* doc/automake.texi: Fix the reported warnings and informative messages
from automake to quote 'like this' rather than as `like this'.  Do the
same for comments and some text in our examples.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] maintcheck: remove a test that can't work for Automake-NG
Stefano Lattarini [Wed, 20 Jun 2012 14:39:44 +0000 (16:39 +0200)] 
[ng] maintcheck: remove a test that can't work for Automake-NG

* syntax-checks.mk (sc_tests_makefile_variable_order): Remove.  This
rule checked that all variables definitions were listed before rules
in the automake-generated Makefile.in files; but this invariant is not
guaranteed anymore by Automake-NG, and in fact it will break more and
more as our work proceeds.
(syntax_check_rules): Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Wed, 20 Jun 2012 12:25:19 +0000 (14:25 +0200)] 
Merge branch 'master' into ng/master

* master:
  maintcheck: guard against obsolete $required entries
  tests: drop requirement 'makeinfo-html'; 'makeinfo' is enough
  tests: drop requirement 'texi2dvi-o'; 'texi2dvi' is enough
  texi: require Texinfo >= 4.9, related enhancements
  docs: it's not true that DISTCHECK_CONFIGURE_FLAGS is maintainer-reserved

+ Extra non-trivial edits:

* t/silent-texi.sh ($required): Simply use 'makeinfo and 'texi2dvi',
instead of (respectively) 'makeinfo-html' and 'texi2dvi-o'.
* t/texinfo21b.sh: Fix a minor typo in heading comments.
($required): Simply use 'makeinfo instead of 'makeinfo-html'
* lib/am/texibuild.am: Merge the changes done in the master branch to
the ".texi -> .dvi" and ".texi -> .pdf" recipes into the definition
of the '$(am__texibuild_dvi_or_pdf)' make function, as well as into ...
(%.dvi: %.texi), (%.pdf: %.texi): ... calls to that function into these
pattern rules.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agofixup: tests: special requirement 'makeinfo-html' removed from ./defs
Stefano Lattarini [Wed, 20 Jun 2012 12:23:28 +0000 (14:23 +0200)] 
fixup: tests: special requirement 'makeinfo-html' removed from ./defs

This should have ideally been part of earlier commit v1.12.1-93-g3c64d54.

* defs (makeinfo-html): Remove.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomaintcheck: guard against obsolete $required entries
Stefano Lattarini [Wed, 20 Jun 2012 11:49:18 +0000 (13:49 +0200)] 
maintcheck: guard against obsolete $required entries

* syntax-check.mk: Add rules guarding against the use of the
obsolete test requirements 'texi2dvi-o' and 'makeinfo-html'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: drop requirement 'makeinfo-html'; 'makeinfo' is enough
Stefano Lattarini [Wed, 20 Jun 2012 10:27:11 +0000 (12:27 +0200)] 
tests: drop requirement 'makeinfo-html'; 'makeinfo' is enough

* defs: Since we now require Texinfo 4.9 or later in the Automake
generated Makefiles, and since the '--html' option of makeinfo, as
well as its capability to generate HTML output, has been supported
since Texinfo 4.0 (according to the Texinfo NEWS file), the
requirement 'makeinfo-html' is obsolete -- the simpler requirement
'makeinfo' is enough.
* t/instdir-texi.sh ($required): Adjust by using simply 'makeinfo'
instead of 'makeinfo-html'.
* t/silent8.sh: Likewise.
* t/txinfo21.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: drop requirement 'texi2dvi-o'; 'texi2dvi' is enough
Stefano Lattarini [Wed, 20 Jun 2012 09:52:20 +0000 (11:52 +0200)] 
tests: drop requirement 'texi2dvi-o'; 'texi2dvi' is enough

* defs: Since we now require Texinfo 4.9 or later in the Automake
generated Makefiles, and since the '-o' option of texi2dvi has been
supported since Texinfo 4.1, the requirement 'texi2dvi-o' is
obsolete -- the simpler requirement 'texi2dvi' is enough.
* t/silent8.sh ($required): Adjust by using simply 'texi2dvi'
instead of 'texi2dvi-o'
* t/txinfo-no-clutter.sh: Likewise.
* t/txinfo13.sh: Likewise.
* t/txinfo23.sh: Likewise.
* t/txinfo24.sh: Likewise.
* t/txinfo25.sh: Likewise.
* t/txinfo28.sh: Likewise.
* t/txinfo33.sh: Likewise.
* t/vtexi4.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotexi: require Texinfo >= 4.9, related enhancements
Stefano Lattarini [Sun, 17 Jun 2012 10:23:18 +0000 (12:23 +0200)] 
texi: require Texinfo >= 4.9, related enhancements

We start passing the '--build-dir' option to the texi2dvi and texi2pdf
invocations done in our Texinfo-related rules.  The argument for this
option will be specific for each info_TEXINFOS entry, to work around a
texi2dvi bug that could otherwise cause racy failures in parallel make
builds:
<http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html>
That bug seems already fixed in the development version of texi2dvi,
though:
<http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00074.html>
so the details of our '--build-dir' usage can be revisited once we can
assume Texinfo 5.0 or later.

Since the '--build-dir' options has been only supported since Texinfo
4.9, we lose compatibility with all older Texinfo versions.

But we also get some real improvements.

First, the '--build-dir' option implies the '--tidy' option; this, like
the '--clean' option that we were formerly using, prevents cluttering of
the build directory with all the TeX and Texinfo auxiliary files and
build by-products, but, differently from '--clean', keeps them around
for later re-runs to use; this shortens the rebuild times considerably.

Second, the use of '--build-dir' also allows us to specify different
build directories for the PDF and DVI output, preventing the rules
building them from stomping on each other's feet when run in parallel.
This is demonstrated by the test cases 'txinfo-no-clutter.sh' and
'txinfo33.sh', which before this change used to fail when run with
MAKE="make -j4", but now succeed even in that case.

* NEWS: Update.
* lib/am/texibuilds.am: Do not try to avoid texi2dvi/texi2pdf option
'-o'; it has been supported since Texinfo 4.1, and we now require
Texinfo >= 4.9.  Remove an obsolete comment.  Modify calls to texi2dvi
and texi2pdf to use the '--build-dir' option, so that TeX auxiliary
files and build by-products for a 'foo.texi' input will be placed in
a 'foo.t2d' directory (for texi2dvi) or in a 'foo.t2p' directory (for
texi2pdf).
* automake.in (scan_texinfo_file): Greatly simplify the implementation,
since we don't need anymore to keep track of the TeX auxiliary files and
build by-products to clean.  Drop the '@CLEAN_FILES' part of the return
value.
(handle_texinfo_helper): Adjust the 'scan_texinfo_file()' call to its
new signature.  Append the "work directories" now created by texi2dvi
and texi2pdf invocation to the list of files/directories removed upon
"make mostlyclean".
* lib/am/texinfos.am: Update the cleaning rules (and comments)
accordingly.
* t/txinfo-no-clutter.sh: Minimal adjustment to avoid spurious failures.
* .gitignore: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] general: simpler workaround for CDPATH issues
Stefano Lattarini [Mon, 18 Jun 2012 14:17:17 +0000 (16:17 +0200)] 
[ng] general: simpler workaround for CDPATH issues

With this change, we also get rid of the $(am__cd) make variable.

* lib/am/header-vars.am (am__cd): Remove.
To ensure a CDPATH exported in the environment doesn't interfere with
our scripts and recipes, we can simply un-export it here (using the GNU
make "unexport" directive), rather than having to rely on $(am__cd) ...
* Makefile.am, automake.in, lib/am/configure.am, lib/am/distdir.am,
lib/am/header-vars.am, lib/am/inst-vars.am, lib/am/remake-hdr.am,
lib/am/tags.am, lib/am/texibuild.am, t/ax/distcheck-hook-m4.am: ... in
several places of these files.
* GNUmakefile, HACKING: Adjust.
* syntax-checks.mk (sc_cd_in_backquotes, sc_cd_relative_dir): Remove,
superseded by ...
(sc_no_am_cd): ... this new target, which has contrary semantics, and
looks *against* the use of the now-obsolete $(am__cd).
(syntax_check_rules): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/texinfo-work' into ng/master
Stefano Lattarini [Mon, 18 Jun 2012 13:37:26 +0000 (15:37 +0200)] 
Merge branch 'ng/texinfo-work' into ng/master

* ng/texinfo-work: (29 commits)
  [ng] texi: drop support for '.txi' and '.texinfo' suffixes
  [ng] coverage: texinfo silent rules with a subdir texinfo file
  [ng] tests: rename silent8.sh -> silent-texi.sh
  [ng] texi: remove some crufty code to support obsolete environment
  [ng] texi: move more code from automake to Makefile
  [ng] texi: "de-prettify" makeinfo command line
  [ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper()
  [ng] texi: simplify handle_texinfo_source by assuming '.info' suffix ...
  [ng] texi: move some more knowledge from automake to texi-spec.am
  [ng] texi: in texi-spec.am, assume suffix for info files is always '.info'
  [ng] automake: remove two unused variables from '&handle_texinfo_source'
  [ng] coverage: texinfo input files using @include directives
  [ng] texi: always look for mdate-sh in the build-aux directory ...
  [ng] refactor: more proper name for a subroutine in automake
  [ng] texi: drop a useless transform when processing texinfos.am
  [ng] texi: adjust names of vars used for silent rules support
  [ng] texi: drop transforms when reading texibuild.am
  [ng] texi: reorganize '.am' fragments even more
  [ng] texi: reorganize '.am' fragments a bit
  [ng] texi: reduce code duplication in output Makefile
  [ng] texi: refactoring in texibuild.am
  [ng] texi: reduce code duplication in texibuild.am
  [ng] texi: read 'texibuild' rules more verbatim
  [ng] texi: be sure to only emit generic pattern rules once
  [ng] texi: drop support for suffix-less info files
  [ng] texi: more target-specific variables use in '.info' build rules
  [ng] texi: reimplement '.info' build using target-specific variables
  [ng] texi: tweak rules for HTML generation to spawn only one shell
  [ng] texi: simplify by always assuming generic rules

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[bg] silent: simplify by taking advantage of GNU make semantics
Stefano Lattarini [Mon, 18 Jun 2012 09:33:00 +0000 (11:33 +0200)] 
[bg] silent: simplify by taking advantage of GNU make semantics

In particular, taking advantage of the fact that, in GNU make, command
line override of variables is propagated to recursive make invocations.

This change offers us a small but nice size reduction bot in Automake's
code and in the generated Makefiles.  It also improves the API to define
custom silent "tags", by turning it from:

    pkg_verbose = $(pkg_verbose_$(V))
    pkg_verbose_ = $(pkg_verbose_$(AM_DEFAULT_V))
    pkg_verbose_0 = @echo PKG-GEN $@;

to the slightly clearer:

    pkg_verbose = $(pkg_verbose/$(V))
    pkg_verbose/1 =
    pkg_verbose/0 = @echo PKG-GEN $@;

* NG-NEWS: Update.
* doc/automake-ng.texi (Automake Silent Rules): Update w.r.t. the
API for user-defined silent rules.
* automake.in: Simplify, by removing the indirections involving
$(AM_DEFAULT_VERBOSITY); some other changes and simplifications.
(verbose_private_var): Delete, its calls from &define_verbose_var
deleted (and those were its only calls).
* lib/am/header-vars.am: Define '$(V)' to 0 if it's not already
defined.
* m4/silent.m4: Initialize and AC_SUBST the variable 'V' directly,
instead of of the indirect 'AM_DEFAULT_VERBOSITY'.  Do not set nor
AC_SUBST the variable 'AM_BACKSLASH', it's not used anymore (and
hasn't been since out overhauling and simplification of the compile
rules).
* GNUmakefile: Simplify a little.
* t/silent6.sh, t/silent-configsite.sh: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: drop support for '.txi' and '.texinfo' suffixes
Stefano Lattarini [Sun, 17 Jun 2012 09:50:55 +0000 (11:50 +0200)] 
[ng] texi: drop support for '.txi' and '.texinfo' suffixes

The former was only needed to cater to 8+3 file systems (for which
we have dropped support anyway), and the latter was hardly used in
practice, it's extra "eye-candy" not worth complicating the code.
We now only accept and handle files with a '.texi' suffix.

* NG-NEWS: Update.
* automake.in (handle_texinfo_helper): Drop support for '.txi'
and '.texinfo' suffixes.
(scan_texinfo_files): Likewise.
* lib/am/texibuild.am: Simplify accordingly, assuming '.texi'
as the only valid suffix for Texinfo input files.
* t/txinfo-rules-once.sh: Resurrect this test, and enhance it
a little, also merging in the suitably adapted contents of ...
* t/txinfo9.sh: ... this test, now deleted.
* t/txinfo6.sh: Remove as obsolete.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] coverage: texinfo silent rules with a subdir texinfo file
Stefano Lattarini [Sun, 17 Jun 2012 08:48:41 +0000 (10:48 +0200)] 
[ng] coverage: texinfo silent rules with a subdir texinfo file

* t/silent-texi.sh: Enhance.  Fix a minor bug while we are it (it
could potentially have caused false negatives).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: rename silent8.sh -> silent-texi.sh
Stefano Lattarini [Sun, 17 Jun 2012 08:39:40 +0000 (10:39 +0200)] 
[ng] tests: rename silent8.sh -> silent-texi.sh

* t/silent8.sh: Rename ...
* t/silent-texi.sh: ... like this.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: remove some crufty code to support obsolete environment
Stefano Lattarini [Sat, 16 Jun 2012 21:18:13 +0000 (23:18 +0200)] 
[ng] texi: remove some crufty code to support obsolete environment

* lib/am/texi-vers.am (%STAMPVTI%): We don't really care anymore about
older systems whose 'mv' program can't move across file systems, nor do
we care about past problems of GNU mv in the AmigaDOS environment.  So
simplify the code accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: move more code from automake to Makefile
Stefano Lattarini [Sat, 16 Jun 2012 20:58:06 +0000 (22:58 +0200)] 
[ng] texi: move more code from automake to Makefile

The previous changes left us with this low-hanging fruit to pick.

* automake.in (handle_texinfo_helper): Since the $makeinfoflags contents
are now static, we don't need to define that variable anymore, nor to
pass the '%MAKEINFOFLAGS%' transform to 'texi-spec.am', nor ...
* lib/am/texi-spec.am: ... to use that transform here to define the target
specific variable '$(am__makeflags)'; we can just ...
* lib/am/texibuild.am: .. inline the static content in the appropriate
rules here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: "de-prettify" makeinfo command line
Stefano Lattarini [Sat, 16 Jun 2012 20:43:50 +0000 (22:43 +0200)] 
[ng] texi: "de-prettify" makeinfo command line

This will make some future changes easier.  And anyway, it's usually not
worth to add code complexity to have a slightly pretty output from make;
people who want pretty output should be using "make V=0" anyway ;-)

* automake.in (handle_texinfo_helper): Make definition of $makeinfoflags
less pretty but more easy.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper()
Stefano Lattarini [Sat, 16 Jun 2012 19:20:32 +0000 (21:20 +0200)] 
[ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper()

The former subroutine has been so reduced in scope and size that it is
just easier to merge it with the bigger one.

* automake.in (handle_texinfo_source): Delete, has been merged ...
(handle_texinfo_helper): ... in here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: simplify handle_texinfo_source by assuming '.info' suffix ...
Stefano Lattarini [Sat, 16 Jun 2012 19:09:23 +0000 (21:09 +0200)] 
[ng] texi: simplify handle_texinfo_source by assuming '.info' suffix ...

... for the output info files.

* automake.in (handle_texinfo_source): Here, in particular removing
the local variable '$dsfx'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: move some more knowledge from automake to texi-spec.am
Stefano Lattarini [Sat, 16 Jun 2012 18:52:27 +0000 (20:52 +0200)] 
[ng] texi: move some more knowledge from automake to texi-spec.am

* automake.in (handle_texinfo_source): Do not define '$dipfx',
nor use it for the transform '%DEST_INFO_PREFIX%'.
* lib/am/texi-spec.am: Adjust the prefix of the output info file
by adding '$(srcdir)' to it if the '?INSRC?' transform is true.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: in texi-spec.am, assume suffix for info files is always '.info'
Stefano Lattarini [Sat, 16 Jun 2012 18:56:37 +0000 (20:56 +0200)] 
[ng] texi: in texi-spec.am, assume suffix for info files is always '.info'

This has been the case since an earlier patch.

* lib/am/texi-spec.am: Simply use '.info' instead of '%DEST_SUFFIX%'.
* automake.in (handle_texinfo_source): Drop the now-useless transform
'%DEST_SUFFIX%' for texi-spec.am

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] automake: remove two unused variables from '&handle_texinfo_source'
Stefano Lattarini [Sat, 16 Jun 2012 18:42:45 +0000 (20:42 +0200)] 
[ng] automake: remove two unused variables from '&handle_texinfo_source'

* automake.in (handle_texinfo_source): Remove '$spfx' and '$ssfx'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] coverage: texinfo input files using @include directives
Stefano Lattarini [Sat, 16 Jun 2012 18:31:48 +0000 (20:31 +0200)] 
[ng] coverage: texinfo input files using @include directives

Both in-tree and VPATH builds, and both top-level and subdir input.

* t/txinfo-include.sh: New test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: always look for mdate-sh in the build-aux directory ...
Stefano Lattarini [Sat, 16 Jun 2012 10:15:42 +0000 (12:15 +0200)] 
[ng] texi: always look for mdate-sh in the build-aux directory ...

... rather than in the current directory if the path of the build-aux
directory had been determined automatically and not explicitly specified
through an AC_CONFIG_AUX_DIR invocation.  This rid us of an ugly
inconsistency wart that was only present for historical reasons.

* automake.in (handle_texinfo_helper): Do not look for the required file
'mdate-sh' in the current directory if $config_aux_dir_set_in_configure_ac
is false; unconditionally look for it in the build-aux directory.
* lib/am/texi-vers.am: Simplify accordingly, getting rid of the (now
undefined by automake) transform %MDDIR%.
* t/mdate4.sh: Remove as obsolete.
* t/vtexi.sh: Remove an hairy and obsolescent grepping check, to avoid
spurious failures.
* t/reqd.sh: Adjust not to check for multiple installations of mdate-sh;
these don't take place anymore.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactor: more proper name for a subroutine in automake
Stefano Lattarini [Sat, 16 Jun 2012 10:01:58 +0000 (12:01 +0200)] 
[ng] refactor: more proper name for a subroutine in automake

After the past heavy changes, a subroutine's name has got out-of-sync
with its purpose.

* automake.in (output_texinfo_build_rules): Rename ...
* (handle_texinfo_source): ... like this.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: drop a useless transform when processing texinfos.am
Stefano Lattarini [Sat, 16 Jun 2012 09:56:57 +0000 (11:56 +0200)] 
[ng] texi: drop a useless transform when processing texinfos.am

* automake.in (handle_texinfos): Drop now-useless transform %TEXIQUIET%.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: adjust names of vars used for silent rules support
Stefano Lattarini [Sat, 16 Jun 2012 09:11:28 +0000 (11:11 +0200)] 
[ng] texi: adjust names of vars used for silent rules support

* lib/am/texibuild.am, automake.in (define_verbose_texinfo): Modify
so that the variables $(AV_texinfo) and $(AM_texidevnull) get renamed
with the much clearer and more proper names $(AM_TEXI_QUIETOPTS) and
$(AM_TEXI_DEVNULL_REDIRECT).
* t/silent8.sh: Enhance.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: drop transforms when reading texibuild.am
Stefano Lattarini [Sat, 16 Jun 2012 08:48:22 +0000 (10:48 +0200)] 
[ng] texi: drop transforms when reading texibuild.am

They are not really needed anymore (being now completely static),
and just inlining them is simpler and clearer.

* lib/am/texibuild.am: Inline transforms ('%TEXIQUIET%',
'%TEXIDEVNULL%', '%AM_V_MAKEINFO%', '%AM_V_DVIPS%', and
'%TEXI-SUFFIXES%').
* automake.in (handle_texinfo): Simplify accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: reorganize '.am' fragments even more
Stefano Lattarini [Sat, 16 Jun 2012 09:35:47 +0000 (11:35 +0200)] 
[ng] texi: reorganize '.am' fragments even more

* lib/am/texinfos.am (TEXI2DVI, TEXI2PDF, DVIPS, MAKEINFOHTML,
AM_MAKEINFOHTMLFLAGS): Move these variables' definitions ...
* lib/am/texibuild.am: ... in here, since their only uses are
here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: reorganize '.am' fragments a bit
Stefano Lattarini [Sat, 16 Jun 2012 09:16:46 +0000 (11:16 +0200)] 
[ng] texi: reorganize '.am' fragments a bit

* lib/am/texinfos.am (%.ps: %.dvi): Move ...
* lib/am/texibuild.am: ... here, which is a more appropriate place
for such a rule.
* automake.in (handle_texinfo): Drop '%AM_V_DVIPS%' when processing
'texinfos.am'; instead, use it when processing 'texibuild.am'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: reduce code duplication in output Makefile
Stefano Lattarini [Sat, 16 Jun 2012 08:30:07 +0000 (10:30 +0200)] 
[ng] texi: reduce code duplication in output Makefile

No semantic change is intended.

* lib/am/texibuild.am: Use a make-runtime $(foreach) loop to define the
conversion rules for all the accepted Texinfo suffixes ('.txi', '.texi',
'.texinfo'), with the help of ...
(am__texi_rules_for_suffix): ... this new internal make function.
* automake.in (handle_texinfo): Adjust.
* t/txinfo6.sh: Adjust and extend.
* t/txinfo-rules-once.sh: Remove as obsolete.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: refactoring in texibuild.am
Stefano Lattarini [Sat, 16 Jun 2012 07:39:59 +0000 (09:39 +0200)] 
[ng] texi: refactoring in texibuild.am

This is only to simplify future changes; no semantic change is
intended.

* lib/am/texibuild.am
(am__texibuild_info): New internal make function.
(%.info: %.%TEXI-SUFFIX%): Use it for the recipe.
(am__texibuild_html): New internal make function.
(%.html: %.%TEXI-SUFFIX%): Use it for the recipe.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: reduce code duplication in texibuild.am
Stefano Lattarini [Sat, 16 Jun 2012 06:59:38 +0000 (08:59 +0200)] 
[ng] texi: reduce code duplication in texibuild.am

No semantic change is intended.

* lib/am/texibuild.am (am__texibuild_dvi_or_pdf): New internal
make function.
(%.dvi: %.%TEXI-SUFFIX%): Use it for the recipe.
(%.pdf: %.%TEXI-SUFFIX%): Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: read 'texibuild' rules more verbatim
Stefano Lattarini [Sat, 16 Jun 2012 06:49:25 +0000 (08:49 +0200)] 
[ng] texi: read 'texibuild' rules more verbatim

No semantic change is intended.

* automake.in (handle_texinfo): Process 'texibuild.am' with
'&process_file' rather than with '&file_contents'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: be sure to only emit generic pattern rules once
Stefano Lattarini [Fri, 15 Jun 2012 21:29:28 +0000 (23:29 +0200)] 
[ng] texi: be sure to only emit generic pattern rules once

* lib/am/texibuild.am: Only hold generic pattern rules now, the
stuff specific to single '.texi' files moved out ...
* lib/am/texi-spec.am: ... to this new file.
* Makefile.am (dist_am_DATA): Add it.
* automake.in (output_texinfo_build_rules): Process 'texi-spec.am'
rather than 'texbuild.am', and adjust transforms accordingly.
(handle_texinfo): Process 'texibuild.am', once for each valid Texinfo
extension (.texi, .txi, .texinfo).
* t/txinfo-rules-once.sh: New test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: drop support for suffix-less info files
Stefano Lattarini [Fri, 15 Jun 2012 20:52:36 +0000 (22:52 +0200)] 
[ng] texi: drop support for suffix-less info files

Such support is seldom used, and will get in the way of future, useful
refactorings.  We can still re-introduce it at a later time, after the
dust is settled, if there are users' requests in this direction.

* automake.in (scan_texinfo_file): Error out if a input '.texi' file
specifies an output (in the '@setfilename' directive) that doesn't have
a '.info' extension.
(output_texinfo_build_rules): Simplify, by assuming generated info
files ought to have the '.info' extension.
* lib/am/texibuild.am: Likewise.
* NG-NEWS: Update
* t/txinfo3.sh: Remove as obsolete.
* t/txinfo-unrecognized-extension-2.sh: New test.
* t/primary-prefix-valid-couples.sh: Adjust to avoid spurious failures.
* t/txinfo17.sh: Likewise.
* t/txinfo20.sh: Likewise.
* t/vtexi2.sh: Likewise.
* t/mdate2.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: more target-specific variables use in '.info' build rules
Stefano Lattarini [Fri, 15 Jun 2012 20:17:32 +0000 (22:17 +0200)] 
[ng] texi: more target-specific variables use in '.info' build rules

* lib/am/texibuild.am: Rewrite '.info' targets' recipes and dependencies
to use the target-specific variable 'am__makeinfoflags', set from the
'%MAKEINFOFLAGS%' transform.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: reimplement '.info' build using target-specific variables
Stefano Lattarini [Fri, 15 Jun 2012 19:48:54 +0000 (21:48 +0200)] 
[ng] texi: reimplement '.info' build using target-specific variables

This refactoring will be useful in later changes.

* lib/am/texibuild.am (%DEST_SUFFIX%: %%SOURCE_SUFFIX%): Rewrite recipe
to use the target-specific variable 'am__info_insrc', which expands to
"yes" when the '?INSRC?' transform is true, and to the empty string
otherwise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: tweak rules for HTML generation to spawn only one shell
Stefano Lattarini [Fri, 15 Jun 2012 17:52:34 +0000 (19:52 +0200)] 
[ng] texi: tweak rules for HTML generation to spawn only one shell

* lib/am/texibuild.am: Rewrite the recipe for .texi -> .html conversion
to use only one shell invocation, mostly for consistency with the other
recipes (e.g., .texi -> .pdf).  This also offers a micro-optimization.
And while we are at it, throw in few other micro-optimizations, and fix
botched indentation.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: simplify by always assuming generic rules
Stefano Lattarini [Fri, 15 Jun 2012 17:19:37 +0000 (19:19 +0200)] 
[ng] texi: simplify by always assuming generic rules

They are assured to work with GNU make even when the '.texi' source
lies in a subdirectory, because in that case also the corresponding
output files ('.pdf', '.ps', '.dvi' and '.html') lies in the same
subdirectory.

* automake.in (output_texinfo_build_rules): Don't define the Boolean
'$generic' anymore.  Related simplifications.  Drop the 'SOURCE' and
'GENERIC' transforms when processing the 'texibuild.am' file.  Remove
obsolete comments.
* lib/am/texibuild.am: Adjust by always assuming that '?GENERIC?'
is true.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agodocs: it's not true that DISTCHECK_CONFIGURE_FLAGS is maintainer-reserved
Stefano Lattarini [Sat, 16 Jun 2012 07:16:53 +0000 (09:16 +0200)] 
docs: it's not true that DISTCHECK_CONFIGURE_FLAGS is maintainer-reserved

At least, not anymore since commit 'v1.11-372-g9760039' of 2001-06-10,
"distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS".  See also
automake bug#8784.

* doc/automake.texi (Flag Variables Ordering): Do not report
'DISTCHECK_CONFIGURE_FLAGS' as a "variables that are only useful
to the maintainer that has no user counterpart": now it is a
user-reserved variable, its maintainer-reserved counterpart
being 'AM_DISTCHECK_CONFIGURE_FLAGS' .

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] general: support a private directory, for use by automake internals
Stefano Lattarini [Fri, 15 Jun 2012 16:50:47 +0000 (18:50 +0200)] 
[ng] general: support a private directory, for use by automake internals

The directory is pointed to by these new internal make variables:

  -  $(am__dir)
  -  $(am__abs_dir)
  -  $(am__top_dir)
  -  $(am__abs_top_dir)

and cleaned by the new 'am--distclean-amdir' recipe (prerequisite of
'distclean-am').  It is not created by default; recipes needing it
should add an order-only dependency on it, as in:

    am-rule: am-prereq | $(am__dir)
        [recipe creating/using files in $(am__dir)]

* lib/am/am-dir.am: New file, define internal make variables that point
to a sandbox directory where we can play freely to implement internal
details that require interaction with the filesystem, and the rules to
properly clean them.  This file is not used yet, it's simply put here
so that future rules will be able to use it when and if it's needed.
* automake.in (generate_makefile): Include the new file, through the
'&preprocess_file' subroutine.
* Makefile.am (dist_am_DATA): List the new file.
* t/am-dir.sh: New test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texinfo: pattern rules with empty suffixes are OK
Stefano Lattarini [Fri, 15 Jun 2012 15:15:52 +0000 (17:15 +0200)] 
[ng] texinfo: pattern rules with empty suffixes are OK

So we can remove a workaround required by Solaris make from our
texinfo rules.

* automake.in (output_texinfo_build_rules): Don't define the boolean
'$generic_info' anymore.  Drop the 'SOURCE_INFO' and 'GENERIC_INFO'
transforms when processing the 'texibuild.am' file.  Remove obsolete
comments, and adjust some of the remaining ones.
* lib/am/texibuild.am: Adjust by always assuming that '?GENERIC_INFO?'
is true.
* t/txinfo3.sh: Adjust and extend.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cosmetics: remove few obsolescent comments in autoamake
Stefano Lattarini [Fri, 15 Jun 2012 14:47:42 +0000 (16:47 +0200)] 
[ng] cosmetics: remove few obsolescent comments in autoamake

* automake.in (read_am_file): Remove obsolete comments (about
OSF make limitations).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] coverage: support for double-colon rules both in Automake and GNU make
Stefano Lattarini [Fri, 15 Jun 2012 14:38:48 +0000 (16:38 +0200)] 
[ng] coverage: support for double-colon rules both in Automake and GNU make

* t/double-colon-rules.sh: New test.
* t/spy-double-colon.sh: Remove as superseded.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] subdirs: use static pattern rules to define *-recursive targets
Stefano Lattarini [Sun, 10 Jun 2012 15:34:10 +0000 (17:34 +0200)] 
[ng] subdirs: use static pattern rules to define *-recursive targets

* lib/am/subdirs.am ($(RECURSIVE_TARGETS), $(RECURSIVE_CLEAN_TARGETS)):
Rewrite as static pattern rules.  This will also simplify their recipes,
avoid extra processing by the shell, and shave off a couple of forks.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] subdirs: prefer "make -C dir" over "cd dir && make"
Stefano Lattarini [Fri, 8 Jun 2012 19:37:40 +0000 (21:37 +0200)] 
[ng] subdirs: prefer "make -C dir" over "cd dir && make"

* lib/am/subdirs.am ($(RECURSIVE_TARGETS), $(RECURSIVE_CLEAN_TARGETS)):
Prefer "$(MAKE) -C $$dir ..." over "($(am__cd) $$dir && $(MAKE) ...".
This allows us to remove a subshell invocation.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Fri, 15 Jun 2012 13:37:19 +0000 (15:37 +0200)] 
Merge branch 'master' into ng/master

* master:
  automake: stop supporting "%KEY?iftrue:iffalse%" transforms
  am: stop using "%KEY:iffalse?iftrue%" transforms
  tests: minor reorganization of few tests
  fixup: adjust t/list-of-tests.mk for renamed/added tests
  subdirs: enhance coverage, tweak and rename few tests
  sync: update files from upstream with "make fetch"
  py-compile: consistently quote 'like this', not `like this'.
  docs: recursive make considered harmful
  docs: clean rules are not run in reverse order of build rules anymore
  silent: new $(AM_V_P) variable, tell if we're running in silent mode
  refactor: silent rules handling (a little)
  refactor: &define_verbose_var: accept a third optional argument

+ Extra non-trivial edits:

* t/dir-named-obj-is-bad.sh, t/sourcefile-in-subdir.sh: Delete, it's how
the old (and in Automake-NG obsolete and removed) tests 't/subdir3.sh'
and 't/subdir7.sh' have been respectively renamed in mainline Automake.
* t/silent6.sh: Don't disable the 'portability-recursive' warnings, they
are not anymore used nor supported by Automake-NG.
* automake.in: Adjust calls to subroutines '&Automake::Variable::define'
and '&define_variable' to the different Automake-NG APIs and signature.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'am-preprocess-drop-tricky-transform'
Stefano Lattarini [Fri, 15 Jun 2012 13:07:05 +0000 (15:07 +0200)] 
Merge branch 'am-preprocess-drop-tricky-transform'

* am-preprocess-drop-tricky-transform:
  automake: stop supporting "%KEY?iftrue:iffalse%" transforms
  am: stop using "%KEY:iffalse?iftrue%" transforms

13 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 15 Jun 2012 08:27:27 +0000 (10:27 +0200)] 
Merge branch 'maint'

* maint:
  tests: minor reorganization of few tests
  fixup: adjust t/list-of-tests.mk for renamed/added tests
  subdirs: enhance coverage, tweak and rename few tests
  sync: update files from upstream with "make fetch"
  py-compile: consistently quote 'like this', not `like this'.
  docs: recursive make considered harmful
  docs: clean rules are not run in reverse order of build rules anymore
  silent: new $(AM_V_P) variable, tell if we're running in silent mode
  refactor: silent rules handling (a little)
  refactor: &define_verbose_var: accept a third optional argument

+ Extra non-trivial edits:

These are due to the fact that support for silent rules is enabled
unconditionally these days (since commit 'v1.12-34-g14141f2' of
2012-05-01, "silent rules: support for them is always active now").

* automake.in: In the new silent related code, do not ever check
whether the 'silent-rules' option is active; just assume support
for silent rules is enabled.
* t/silent-obsolescent-warns.sh: Remove as obsolete.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'docs-recursion' into maint
Stefano Lattarini [Fri, 15 Jun 2012 08:09:19 +0000 (10:09 +0200)] 
Merge branch 'docs-recursion' into maint

* docs-recursion:
  docs: recursive make considered harmful

13 years agoMerge branch 'silent-custom' into maint
Stefano Lattarini [Fri, 15 Jun 2012 08:09:04 +0000 (10:09 +0200)] 
Merge branch 'silent-custom' into maint

* silent-custom:
  silent: new $(AM_V_P) variable, tell if we're running in silent mode
  refactor: silent rules handling (a little)
  refactor: &define_verbose_var: accept a third optional argument

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] all, check, install: move more processing at make runtime
Stefano Lattarini [Sun, 6 May 2012 20:54:45 +0000 (22:54 +0200)] 
[ng] all, check, install: move more processing at make runtime

A welcome collateral effect of this change is that now the 'check-local',
'all-local' and 'installdirs-local' targets can also be defined in
wrapper Makefiles or in Makefile fragments only included at make (not
automake) runtime, without their definition ever having to be seen by
Automake.

* lib/am/all-target.am: New file, implementing the 'all' target.
* lib/am/check-target.am: New file, implementing the 'check' target.
* automake.in (handle_install): Adjust by processing it simply with
'&preprocess_file', and placing its content in '$output_verbatim'
rather than in '$output_rules'.
(handle_all, )
* lib/am/install.am: Largely rewritten to rely on GNU make runtime
capabilities rather than on automake-runtime preprocessing.
* automake.in (handle_install): Adjust by processing it simply with
'&preprocess_file', and placing its content in '$output_verbatim'
rather than in '$output_rules'.
* automake.in (handle_all, do_check_merge_target): Merged into ...
(handle_all_and_check): ... this, and largely rewritten to rely
on the new 'lib/am/{all,check}-target.am' files.
(generate_makefile): Adjust.
* Makefile.am (dist_am_DATA): Add the new '.am' files.
(XFAIL_TESTS): Add test 't/override-suggest-local.sh', that has been
broken by this change (we consider this an acceptable trade-off).
* doc/automake-ng.texi: Remove reference to removed test.
* lib/am/header-vars.am: Sanitize $(SUBDIRS), by setting it to the
empty value if it is not set, but not from the Makefile not any
command-line override.
* t/built-sources-check.sh: Remove obsolete grepping checks.
* t/remake-all-1.sh: Likewise.
* t/bsource.sh: Adjust and enhance.
* t/check.sh: Remove as basically obsolete.
* t/check2.sh: Relax grepping checks.
* t/doc-parsing-buglets-tabs.sh: Remove as too brittle.
* t/local-targets.sh: New test.
* t/tap-diagnostic.sh: Fix grepping of "make check" stdout to avoid
spurious errors.
* t/phony.sh: Tweak, to avoid spurious failure.
* t/vartar.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] built sources: enhance testsuite coverage
Stefano Lattarini [Sun, 6 May 2012 18:59:28 +0000 (20:59 +0200)] 
[ng] built sources: enhance testsuite coverage

This will be useful to better check the correctness of later changes.

* t/built-sources.sh: New test, checks basic functionality for
BUILT_SOURCES.
* t/built-sources.sh: New test, checks basic interaction between
BUILT_SOURCES and Automake conditionals.
* t/check3.sh: Split this out ...
* t/built-sources-check.sh, t/built-sources-install.sh: ... into
these tests, to offer more granularity and make the purpose of the
tests immediately clear from their names.
* t/subdirbuiltsources.sh: Rename this ...
* t/built-sources-subdir.sh: ... to this, for consistency.  Since
we are at it, fix a couple of typos and remove redundant stuff.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoautomake: stop supporting "%KEY?iftrue:iffalse%" transforms
Stefano Lattarini [Thu, 14 Jun 2012 21:45:08 +0000 (23:45 +0200)] 
automake: stop supporting "%KEY?iftrue:iffalse%" transforms

And the similar "reduced forms" "%KEY:iffalse%" and "%KEY?iftrue%"
as well.

They are convoluted, never used (after the previous change), and will
get in the way in the Automake-NG branch, where we'll soon want to use
GNU make static pattern rules in our internal '*.am' fragments.

* automake.in (preprocess_file, transform): Simplify not to support
those transform patterns.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoam: stop using "%KEY:iffalse?iftrue%" transforms
Stefano Lattarini [Thu, 14 Jun 2012 21:41:58 +0000 (23:41 +0200)] 
am: stop using "%KEY:iffalse?iftrue%" transforms

And the similar "reduced forms" "%KEY:iffalse%" and "%KEY?iftrue%"
as well.

They are harder to grasp, can be easily reformulated in function of
other "plainer" transforms ("?KEY?" and "?!KEY?"), and we'll remove
support for them anyway in a later change.

* lib/am/data.am, lib/am/libs.am, lib/am/lisp.am, lib/am/ltlib.am,
lib/am/progs.am, lib/am/python.am, lib/am/scripts.am: Adjusted not
to rely on those kinds of transforms.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: minor reorganization of few tests
Stefano Lattarini [Thu, 14 Jun 2012 21:27:42 +0000 (23:27 +0200)] 
tests: minor reorganization of few tests

* t/subdir3.sh: Rename ...
* t/sourcefile-in-subdir.sh: ... like this.
* t/subdir4.sh: Rename ...
* t/depcomp-implicit-auxdir.sh: ... like this.
* t/subdir6.sh: Rename ...
* t/confh-subdir-clean.sh: ... like this.
* t/subdir7.sh: Renamed ...
* t/dir-named-obj-is-bad.sh: ... like this, and enhance.
* t/srcsub.sh, t/srcsub2.sh: Unify ...
* t/src-acsubst.sh: ... as this test.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agofixup: adjust t/list-of-tests.mk for renamed/added tests
Stefano Lattarini [Thu, 14 Jun 2012 21:04:33 +0000 (23:04 +0200)] 
fixup: adjust t/list-of-tests.mk for renamed/added tests

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agosubdirs: enhance coverage, tweak and rename few tests
Stefano Lattarini [Thu, 14 Jun 2012 20:47:28 +0000 (22:47 +0200)] 
subdirs: enhance coverage, tweak and rename few tests

* t/subdir5.sh: Rename ...
* t/subdir-add-pr46.sh: ... like this.
* t/subdir8.sh: Rename ...
* t/subdir-add2-pr46.sh: ... like this.
* t/cond2.sh: Rename ...
* t/subdir-cond-err.sh: ... like this.
* t/subdir9.sh: Rename ...
* t/subdir-with-slash.sh: ... like this; improve heading comments.
* t/subcond.sh: Rename ...
* t/subdir-cond-gettext.sh: ... like this; improve m4 quoting.
* t/subcond2.sh: Rename ...
* t/subdir-am-cond.sh: ... like this; adjust heading comments.
* t/subcond3.sh: Rename ...
* t/subdir-ac-subst.sh: ... like this; adjust heading comments.
* t/subdir2.sh: Rename ...
* t/subdir-subsub.sh: ... like this; enhance so that it also runs
'./configure' and 'make'.
* t/subdir-order.sh: New test, check that the $(SUDBIRS) entries
are processed in the order they are specified.
* doc/automake.texi: Adjust references to tests.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agosync: update files from upstream with "make fetch"
Stefano Lattarini [Thu, 14 Jun 2012 14:32:47 +0000 (16:32 +0200)] 
sync: update files from upstream with "make fetch"

* lib/config.guess, lib/gitlog-to-changelog, lib/texinfo.tex: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agopy-compile: consistently quote 'like this', not `like this'.
Stefano Lattarini [Thu, 14 Jun 2012 14:30:16 +0000 (16:30 +0200)] 
py-compile: consistently quote 'like this', not `like this'.

* lib/py-compile (usage_error): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng]: tests: avoid spurious failure with Korn shells
Stefano Lattarini [Wed, 13 Jun 2012 11:10:46 +0000 (13:10 +0200)] 
[ng]: tests: avoid spurious failure with Korn shells

* t/test-driver-custom-multitest-recheck2.sh: Don't call 'unset' on
the variable 'var', that is never actually set.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agodocs: recursive make considered harmful
Stefano Lattarini [Tue, 12 Jun 2012 15:24:21 +0000 (17:24 +0200)] 
docs: recursive make considered harmful

In the documentation, we shouldn't confuse "packages using subdirectories"
with "packages using recursive make invocations".  A package can have a
careful organization in subdirectories, make no (or almost no) use of make
recursion (examples of such packages are GNU bison, GNU cppi, and Automake
itself).

In fact, make recursion should be used as seldom as possible, because it
makes the build system more brittle and dependency declarations less
faithful.  See Peter Miller's article "Recursive Make Considered Harmful"
for more a more in-depth discussion:

    http://miller.emu.id.au/pmiller/books/rmch/

* doc/automake.texi (Directories): Clarify how a build system based on
make recursion does.  Observe that such a system, albeit being very
widespread, has its own issues and drawbacks, and that one can have a
non-recursive setup also for projects using complex directory layout.
(Recursing subdirectories): Speak of "packages that use make recursion"
rather than of "packages with subdirectories".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'subdirs-simplify' into maint
Stefano Lattarini [Tue, 12 Jun 2012 14:12:45 +0000 (16:12 +0200)] 
Merge branch 'subdirs-simplify' into maint

* subdirs-simplify:
  docs: clean rules are not run in reverse order of build rules anymore

13 years agodocs: clean rules are not run in reverse order of build rules anymore
Stefano Lattarini [Tue, 12 Jun 2012 14:10:19 +0000 (16:10 +0200)] 
docs: clean rules are not run in reverse order of build rules anymore

At least since commit 'v1.12.1-12-gec6a135' of 2012-06-10, "subdirs: unify
rules for "cleaning" and "normal" recursive targets"

* doc/automake.texi (Recursing subdirectories): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng]: tests: don't check whether $MAKE is GNU make -- of course it is
Stefano Lattarini [Tue, 12 Jun 2012 13:39:19 +0000 (15:39 +0200)] 
[ng]: tests: don't check whether $MAKE is GNU make -- of course it is

Revealed by "make maintcheck".

* t/subobj-clean-pr10697.sh: Don't call 'using_gmake' to determine
whether $MAKE is GNU make, and just assume GNU make semantics for
automatic Makefile rebuilding.
* t/subobj-clean-lt-pr10697.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Tue, 12 Jun 2012 12:01:45 +0000 (14:01 +0200)] 
Merge branch 'master' into ng/master

* master:
  maintcheck: fix failures, both real and spurious
  subdir tests: avoid an use of "make -j4", for portability
  tests: avoid failure due to libtool quirks in C++ demo test
  tests: fix spurious failures due to missing '$sleep'
  subdirs: unify rules for "cleaning" and "normal" recursive targets
  tests: add a "demo" test on C support
  tests: look for '.lo' rather than '.o' object when using Libtool with C++
  cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
  maint: grammar fixes: s/all these/all of these/
  subdir-objects: improve "make mostlyclean" efficiency and flexibility

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Mon, 11 Jun 2012 19:39:46 +0000 (21:39 +0200)] 
Merge branch 'maint'

* maint:
  maintcheck: fix failures, both real and spurious
  subdir tests: avoid an use of "make -j4", for portability
  tests: avoid failure due to libtool quirks in C++ demo test
  tests: fix spurious failures due to missing '$sleep'
  subdirs: unify rules for "cleaning" and "normal" recursive targets
  tests: add a "demo" test on C support
  tests: look for '.lo' rather than '.o' object when using Libtool with C++
  cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
  maint: grammar fixes: s/all these/all of these/
  subdir-objects: improve "make mostlyclean" efficiency and flexibility

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'subdir-objects-pr10697' into maint
Stefano Lattarini [Mon, 11 Jun 2012 19:27:12 +0000 (21:27 +0200)] 
Merge branch 'subdir-objects-pr10697' into maint

* subdir-objects-pr10697:
  maintcheck: fix failures, both real and spurious

13 years agomaintcheck: fix failures, both real and spurious
Stefano Lattarini [Mon, 11 Jun 2012 19:21:32 +0000 (21:21 +0200)] 
maintcheck: fix failures, both real and spurious

* syntax-checks.mk (sc_rm_minus_f): Whitelist the
't/subobj-clean*-pr10697.sh' tests.
* t/subobj-clean-pr10697.sh: When redefining PATH,
use '$PATH_SEPARATOR', not hard-coded ':'.
* t/subobj-clean-lt-pr10697.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: merged some testsuite fixlets
Stefano Lattarini [Mon, 11 Jun 2012 17:48:08 +0000 (19:48 +0200)] 
tests: merged some testsuite fixlets

* fix-cxx-libtool-demo:
  tests: avoid failure due to libtool quirks in C++ demo test

* subdir-objects-pr10697:
  tests: fix spurious failures due to missing '$sleep'

* subdirs-simplify:
  subdir tests: avoid an use of "make -j4", for portability

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agosubdir tests: avoid an use of "make -j4", for portability
Stefano Lattarini [Mon, 11 Jun 2012 17:46:46 +0000 (19:46 +0200)] 
subdir tests: avoid an use of "make -j4", for portability

Otherwise, a spurious failure with Solaris CCS make can be triggered.
The coverage is not actually reduced, since the code path is still
covered when one runs the testsuite with AM_TESTSUITE_MAKE="make -jN"
(as should be done periodically).

* t/subdir-distclean.sh : Call simply "make maintainer-check", not
"make -j4 maintainer-check".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>