]> git.ipfire.org Git - thirdparty/automake.git/log
thirdparty/automake.git
13 years agoMerge branch 'ng/cleanup-revamp' into ng/master
Stefano Lattarini [Wed, 27 Jun 2012 11:19:53 +0000 (13:19 +0200)] 
Merge branch 'ng/cleanup-revamp' into ng/master

* ng/cleanup-revamp:
  [ng] cleanup: merge '%compile_clean_files' in '%clean_files'
  [ng] clean: drop minor DOS-related cruft in libtool support
  [ng] cleanup: remove 'clean-hdr.am'
  [ng] check: keep cleaning of '.log' and '.trs' files near other rules
  [ng] cleanup: remove 'libtool.am'
  [ng] refactor: prefer '&file_contents' over '&file_contents_internals'
  [ng] cleanup: merge '%compile_clean_files' in '%clean_files'
  [ng] refactoring: no "cleaning" rules in compile.am
  [ng] clean: don't remove object files in '.' unconditionally
  [ng] cleanup: remove 'depend.am'
  [ng] refactoring: move definition of $(am__mv) in depend2.am
  [ng] automake: new global variable '%clean_dirs'
  [ng] clean: do not ignore errors while removing files
  [ng] clean: revamp recipes and APIs to extend cleaning rules
  [ng] clean: simplify cleaning of compiled objects
  [ng] deptrack: clean depdirs using *clean-am targets
  [ng] deptrack: remove an obsolete comment

13 years ago[ng] missing: no need to suggest GNU make explicitly
Stefano Lattarini [Wed, 27 Jun 2012 11:05:00 +0000 (13:05 +0200)] 
[ng] missing: no need to suggest GNU make explicitly

* lib/missing (give_advice): Here.  In mainstream Automake, possible use
of GNU make was suggested as a remedy against useless remake of '.info'
files triggered by some buggy vendor make implementations.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] missing: suggest Automake-NG, not mainstream Automake
Stefano Lattarini [Wed, 27 Jun 2012 10:59:18 +0000 (12:59 +0200)] 
[ng] missing: suggest Automake-NG, not mainstream Automake

* lib/missing (program_details): Here.

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

* master:
  missing: --run is supported again (as a no-op) for use by older automake

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'missing-not-touch-just-warn'
Stefano Lattarini [Tue, 26 Jun 2012 18:16:21 +0000 (20:16 +0200)] 
Merge branch 'missing-not-touch-just-warn'

* missing-not-touch-just-warn:
  missing: --run is supported again (as a no-op) for use by older automake

13 years agomissing: --run is supported again (as a no-op) for use by older automake
Eric Blake [Tue, 26 Jun 2012 16:40:39 +0000 (10:40 -0600)] 
missing: --run is supported again (as a no-op) for use by older automake

Commit v1.12.1-87-ga22717d of 2012-06-21 ("missing: do not touch
timestamps; only warn for out-of-date files") has removed the '--run'
option, since our new preferred calling conventions now imply it; but
if a newer 'missing' is mixed with an already built project that used
an older Automake version (this happened in practice for GNU m4; see:
<http://lists.gnu.org/archive/html/bug-m4/2012-06/msg00001.html>), then
the 'Makefile' in that project will fail due to passing the '--run'
option when trying to bring the project up-to-date.

* lib/missing: Parse and ignore '--run'.

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

* master:
  missing: don't cater to 'configure.in' in our advice
  missing: better tips about missing tools

+ Extra non-trivial edits:

* lib/missing (autoheader*): Remove reference to 'acconfig.h',
support for which has been removed in Automake-NG (see commit
v1.12-263-gf94562c).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'missing-not-touch-just-warn'
Stefano Lattarini [Mon, 25 Jun 2012 08:40:39 +0000 (10:40 +0200)] 
Merge branch 'missing-not-touch-just-warn'

* missing-not-touch-just-warn:
  missing: don't cater to 'configure.in' in our advice
  missing: better tips about missing tools

13 years agomissing: don't cater to 'configure.in' in our advice
Stefano Lattarini [Mon, 25 Jun 2012 08:38:58 +0000 (10:38 +0200)] 
missing: don't cater to 'configure.in' in our advice

The use of 'configure.in' as autoconf input now deprecated the development
versions of both Automake and Autoconf, and we'd like to speed up its
demise.

* missing: In the advice displayed in case some autotools are detected to
be missing, refer to 'configure.ac' unconditionally, instead of referring
to 'configure.in' when that file exists in the current directory (and no
'configure.ac' does).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Sun, 24 Jun 2012 08:56:46 +0000 (10:56 +0200)] 
Merge branch 'master' into ng/master

* master:
  tests: fix automatic re-execution of tests with Zsh
  tests: drop support for older Zsh shells
  tests: allow AM_TEST_RUNNER_SHELL to be overridden
  tests: fix setup for older Zsh
  missing: do not touch timestamps; only warn for out-of-date files

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Sun, 24 Jun 2012 08:12:43 +0000 (10:12 +0200)] 
Merge branch 'maint'

* maint:
  tests: fix automatic re-execution of tests with Zsh
  tests: drop support for older Zsh shells
  tests: allow AM_TEST_RUNNER_SHELL to be overridden
  tests: fix setup for older Zsh

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix automatic re-execution of tests with Zsh
Stefano Lattarini [Sat, 23 Jun 2012 11:42:10 +0000 (13:42 +0200)] 
tests: fix automatic re-execution of tests with Zsh

* defs: Use '$argv0' instead of '$0'.  With Zsh not started right
away in Bourne-compatibility mode, the latter will be the path not
of the test script itself, but of the file it's currently sourcing
-- i.e., in our case, './defs'.  This would cause the automatic
re-execution code to execute './defs' (basically a no-op) rather
than re-run the test correctly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: drop support for older Zsh shells
Stefano Lattarini [Sat, 23 Jun 2012 09:16:08 +0000 (11:16 +0200)] 
tests: drop support for older Zsh shells

* defs-static.in: Here.  The fact that such support has been broken for
almost a year (only fixed by today's commit 'v1.12.1-57-gf1e0300'),
causing no bug reports from anyone, shows that such support is not truly
warranted.  And it will get in the way of future improvements in the
handling of the exit trap (because bugs in older Zsh versions will
prevent some of our planned improvements).  So just drop it.
* t/README: Remove obsolete advice for working around bugs in older
versions of Zsh; instead, indicate version 4.3 is the oldest Zsh now
supported.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: allow AM_TEST_RUNNER_SHELL to be overridden
Stefano Lattarini [Sat, 23 Jun 2012 08:39:33 +0000 (10:39 +0200)] 
tests: allow AM_TEST_RUNNER_SHELL to be overridden

* defs-static.in: Here.  This will make it easier for the maintainer
to run some self checks (like those in 't/self-check-exit.tap') with
different shells, to look for possible portability problems.  Fix a
typo (doubled "the") while we are at it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix setup for older Zsh
Stefano Lattarini [Sat, 23 Jun 2012 08:34:29 +0000 (10:34 +0200)] 
tests: fix setup for older Zsh

* defs-static.in: After the addition of TAP-based tests and our renaming
of "simple" test scripts from 'tests/foo.test' to 't/foo.sh', a test name
is valid if it matches the wildcard "*.sh" or "*.tap", not the wildcard
"*.test".  Adjust accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomissing: better tips about missing tools
Stefano Lattarini [Sat, 23 Jun 2012 07:04:46 +0000 (09:04 +0200)] 
missing: better tips about missing tools

* lib/missing: Try to point the user to the home page of such tools
where possible.  Also, make clear that some tools (e.g., aclocal or
autoheader) are distributed as part of bigger projects (resp. automake
and autoconf, in those cases).  While at it, refactor and re-format
the existing code heavily, in particular introducing
(give_advice): ... this new function in the process.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
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 'missing-not-touch-just-warn'
Stefano Lattarini [Fri, 22 Jun 2012 22:32:30 +0000 (00:32 +0200)] 
Merge branch 'missing-not-touch-just-warn'

* missing-not-touch-just-warn:
  missing: do not touch timestamps; only warn for out-of-date files

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 ago[ng] cleanup: merge '%compile_clean_files' in '%clean_files'
Stefano Lattarini [Thu, 21 Jun 2012 20:07:15 +0000 (22:07 +0200)] 
[ng] cleanup: merge '%compile_clean_files' in '%clean_files'

No need to keep them separated anymore.

* automake.in (%libtool_clean_directories): Delete.
(initialize_per_input): Don't reset it.
(handle_compile): Don't merge '%libtool_clean_directories' (after
proper editing) into '%clean_dirs'.
(handle_ltlibraries, handle_programs, handle_single_transform):
Update '%clean_dirs', rather than '%libtool_clean_directories'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] clean: drop minor DOS-related cruft in libtool support
Stefano Lattarini [Thu, 21 Jun 2012 19:49:50 +0000 (21:49 +0200)] 
[ng] clean: drop minor DOS-related cruft in libtool support

* automake.in (handle_libtool): Do not bother cleaning '_libs'
directories, they are only used by Libtool on MS-DOS (and we
don't support that anymore).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: remove 'clean-hdr.am'
Stefano Lattarini [Thu, 21 Jun 2012 19:26:17 +0000 (21:26 +0200)] 
[ng] cleanup: remove 'clean-hdr.am'

It's so small and dumb that it's easier and cleaner to just inline
it in the automake script.

* lib/am/clean-hdr.am: Delete.
* Makefile.am (dist_am_DATA): Remove it.
* automake.in (handle_configure): Just add the header configs and their
stamp files to '%clean_files', instead of processing the now-removed
'clean-hdr.am' to obtain the same effect.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] check: keep cleaning of '.log' and '.trs' files near other rules
Stefano Lattarini [Thu, 21 Jun 2012 10:27:06 +0000 (12:27 +0200)] 
[ng] check: keep cleaning of '.log' and '.trs' files near other rules

* lib/am/parallel-tests.am: Add $(am__test_results), $(am__test_logs)
and $(TEST_SUITE_LOGS) to the list of files removed by "make mostlyclean"
here ...
* automake.in (handle_tests): ... rather than here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: remove 'libtool.am'
Stefano Lattarini [Thu, 21 Jun 2012 08:38:01 +0000 (10:38 +0200)] 
[ng] cleanup: remove 'libtool.am'

It's so small and dumb that it's easier and cleaner to just inline
it in the automake script.

* lib/am/libtool.am: Delete.
* Makefile.am (dist_am_DATA): Remove it.
* automake.in (handle_libtool): Just add the list of all the '.libs'
directories to '%libtool_clean_directories', instead of processing the
now-removed 'libtool.am' to obtain the same effect.  Similarly, when
processing the Makefile in the top-level directory, add 'libtool' and
'config.lt' to '%clean_files'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactor: prefer '&file_contents' over '&file_contents_internals'
Stefano Lattarini [Thu, 21 Jun 2012 08:21:10 +0000 (10:21 +0200)] 
[ng] refactor: prefer '&file_contents' over '&file_contents_internals'

No semantic change intended.

* automake.in (handle_compile): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: merge '%compile_clean_files' in '%clean_files'
Stefano Lattarini [Thu, 21 Jun 2012 07:51:35 +0000 (09:51 +0200)] 
[ng] cleanup: merge '%compile_clean_files' in '%clean_files'

No need to keep them separated anymore.

* automake.in (%compile_clean_files): Delete.
(initialize_per_input): Don't reset it.
(handle_compile): Don't merge '%compile_clean_files'
contents into '%clean_files'.
(handle_single_transform): Update '%clean_files', not
'%compile_clean_files'.
(handle_LIBOBJS_or_ALLOCA): Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactoring: no "cleaning" rules in compile.am
Stefano Lattarini [Thu, 21 Jun 2012 00:10:54 +0000 (02:10 +0200)] 
[ng] refactoring: no "cleaning" rules in compile.am

* automake.in (handle_compile): To ensure the compiled objects are
removed, simply merge the contents of '%compile_clean_files' into
'%clean_files' here, instead of ...
* lib/am/compile.am (am__mostlyclean_files): ... appending them to
this variable here.  While we are at it, remove a stray declaration
of the already-deleted target 'mostlyclean-compile' as ".PHONY".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] clean: don't remove object files in '.' unconditionally
Stefano Lattarini [Thu, 21 Jun 2012 00:01:11 +0000 (02:01 +0200)] 
[ng] clean: don't remove object files in '.' unconditionally

Do that only if some source file is actually present in the current
directory (which might not be the case for, say, projects that use
a non-recursive make setup and have all sources in the 'src' and 'lib'
subdirectories).

* lib/am/compile.am (am__mostlyclean_files): Don't append '*.$(OBJEXT)'
unconditionally.
* lib/am/libtool.am (am__mostlyclean_files): Don't append '*.lo'
unconditionally.
* automake.in (handle_single_transform): Update '%compile_clean_files'
also for sources in the current directory.  Some related adjustments.
Remove obsolete comments while we are at it.
(handle_LIBOBJS_or_ALLOCA): Update '%compile_clean_files' to list
all the object files in the directory of the extra sources brought
in.  Adjust comments accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: remove 'depend.am'
Stefano Lattarini [Wed, 20 Jun 2012 23:38:50 +0000 (01:38 +0200)] 
[ng] cleanup: remove 'depend.am'

It's so small and dumb that it's easier and cleaner to just inline
it in the automake script.

* lib/am/depend.am: Delete.
* Makefile.am (dist_am_DATA): Remove it.
* automake.in (handle_languages): Just add the list of all the '.deps'
directories to %clean_dirs, instead of processing the now-removed
'depend.am' to obtain the same effect.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactoring: move definition of $(am__mv) in depend2.am
Stefano Lattarini [Wed, 20 Jun 2012 23:27:15 +0000 (01:27 +0200)] 
[ng] refactoring: move definition of $(am__mv) in depend2.am

A tiny refactoring only needed by the subsequent change.

* lib/am/depend.am (am__mv): Move definition ...
* lib/am/depend2.am [%?FIRST%]: ... here, with a new explicative
comment.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] automake: new global variable '%clean_dirs'
Stefano Lattarini [Wed, 20 Jun 2012 23:10:14 +0000 (01:10 +0200)] 
[ng] automake: new global variable '%clean_dirs'

Similar to the '%clean_files' variable, but it will allow us to declare
directories (rather than regular files) that are to be cleaned by the
four flavours of cleaning targets ('mostlyclean', 'clean', 'distclean',
'maintainer-clean').  This will be especially useful in later changes.

* automake.in (%clean_dirs): New global.
(initialize_per_input): Reset it.
* automake.in (handle_clean), lib/am/clean.am: Extend to clean the
directories registered in '%clean_dirs'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] clean: do not ignore errors while removing files
Stefano Lattarini [Sat, 2 Jun 2012 13:36:55 +0000 (15:36 +0200)] 
[ng] clean: do not ignore errors while removing files

Possible culprits have been identified with the command "git grep '-rm\b'".

* NG-NEWS: Update.
* lib/am/tags.am, lib/am/distdir.am, lib/am/dejagnu.am, lib/am/clean.am: Do
not prefix recipes invoking "rm" with the "-" recipe modifier: we now want
the cleaning recipes to fail if rm encounters an error.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] clean: revamp recipes and APIs to extend cleaning rules
Stefano Lattarini [Wed, 30 May 2012 17:23:46 +0000 (19:23 +0200)] 
[ng] clean: revamp recipes and APIs to extend cleaning rules

This change it introduces eight new internal variables, which all
can been appended to by our Makefile fragments to declare stuff that
should be cleaned upon the various "make *clean" targets; these new
variables are:

  - am__mostlyclean_files, am__mostlyclean_dirs
  - am__clean_files,       am__clean_dirs
  - am__distclean_files,   am__distclean_dirs
  - am__maintclean_files,  am__maintclean_dirs

This change also ensures that the contents of the $(MOSTLYCLEANFILES),
$(CLEANFILES), $(DISTCLEANFILES) and $(MAINTAINERCLEANFILES) variables
will be cleaned even if those variables were not defined in the
Makefile.am (so that it is now possible to, e.g., define them in a
wrapper GNUmakefile including the Automake-generated Makefile, and
still have the relevant '*clean' targets remove them).

* am/clean.am (distclean): Revamp to implement the new API.
* lib/am/compile.am, lib/am/configure.am, lib/am/dejagnu.am,
lib/am/depend.am, lib/am/clean-hdr.am, lib/am/java.am, lib/am/libs.am,
lib/am/libtool.am, lib/am/lisp.am, lib/am/ltlib.am, lib/am/progs.am,
lib/am/tags.am, lib/am/texi-vers.am, lib/am/texinfos.am: Where possible
and easy, adjust to append to those variables instead of tweaking
or extending the various '*clean' or '*clean-am' targets or their
dependencies.
* automake.in (handle_compile, handle_libtool, handle_clean): Adjust.
* t/cleanvars.sh: New test.
* t/libtoo10.sh: Extend.
* t/libtool.sh, t/libtool2.sh: Remove as obsolete.
* syntax-checks.am: Extend to catch possible typos in the use of
the new variables (for example, it is easy to erroneously write
'am__cleanfiles' instead of 'am__clean_files').

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] clean: simplify cleaning of compiled objects
Stefano Lattarini [Wed, 30 May 2012 16:57:18 +0000 (18:57 +0200)] 
[ng] clean: simplify cleaning of compiled objects

* automake.in (handle_compile): Compiled objects are always to be
removed upon "make mostlyclean", never requiring a much stronger
"make distclean" to be cleaned.  Simplify accordingly.
* am/compile.am: Simplify accordingly, and do not bother cleaning
'*.tab.c' files, that shouldn't be left behind by Automake-generated
Makefiles anyway.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] deptrack: clean depdirs using *clean-am targets
Stefano Lattarini [Wed, 30 May 2012 14:35:34 +0000 (16:35 +0200)] 
[ng] deptrack: clean depdirs using *clean-am targets

* lib/am/depend.am (am--clean-depdirs): New target, removing the
$(DEPDIR) directory.
(distclean, maintainer-clean): Renamed ...
(distclean-am, maintainer-clean-am): ... to these, and depend on the new
target above to clean the $(DEPDIR) directory.  Given the current status
of the Automake internals, this shouldn't cause any change in the automake
behaviour, but the new form of these declarations will be useful in future
refactorings.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] deptrack: remove an obsolete comment
Stefano Lattarini [Wed, 30 May 2012 14:24:59 +0000 (16:24 +0200)] 
[ng] deptrack: remove an obsolete comment

* lib/am/depend.am: Since in Automake-NG the generated Makefile calls
'-include' (not 'include') on the dependency tracking '.Po' files, 'make'
will never fail simply because a '.Po' file is not found.  Remove a
comment regarding the now-impossible include failure.

Co-authored-by: Dave Hart <davehart@gmail.com>
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 agomissing: do not touch timestamps; only warn for out-of-date files
Stefano Lattarini [Fri, 15 Jun 2012 09:13:00 +0000 (11:13 +0200)] 
missing: do not touch timestamps; only warn for out-of-date files

Before this change, the missing script had a twofold role:

  - it warned the user if some required maintainer tools was missing,
    or too old;

  - in such a case, it tried to "fix" the timestamp of the files that
    should have been rebuilt by that tool (without actually updating
    the file contents, of course), to allow the build to continue.

The second capability used to be quite useful in the days when most
projects committed files generated by maintainer-only tools in their
VCS repository (today the trend is not to keep such generated files
VCS-committed anymore).  In such a setup, the "timestamp-fixing"
capability of 'missing' was quite useful, in that it allowed users
lacking some required maintainer tool to build from a VCS checkout
in the face of skewed timestamps (as could have been caused by
"cvs update" or "git checkout").

But then, when the automatic remake rules kicked in due to the
generated files being *actually out-of-date* (e.g., because the user
had modified 'configure.ac' but lacked a modern-enough autoconf to
rebuild it), that behaviour of 'missing' caused the same problem that
plagued AM_MAINTAINER_MODE; i.e., the user would get non-dependable
builds and inconsistent statuses of the build tree -- changes to
source files don't reflect on generated files, and this can be very
confusing and cause hard-to-spot errors).

So we now believe that the best approach to deal with timestamp-related
issues is not to have 'missing' to "automagically" try to resolve
them (with all the risk and brittleness entailed), but rather to
suggest those projects still keeping generated files committed in their
VCS to provide a proper (say) 'fix-timestamp.sh' script that touches
the timestamp of the checked-out files, to ensure no spurious rebuild
will be triggered.  As a bonus, such a script can be more aware of the
particularities, nooks and corner cases of a project, and thus more
reliable than the old 'missing' script.

An example of this approach is offered by GNU awk (release 4.0.1, Git
tag 'gawk-4.0.1', commit b85b04e8).  The GNU awk maintainers commit
the Autotools-generated files (configure, Makefile.in, etc.) and other
generated in the project's Git repository, but offer a useful script
'bootstrap.sh' that fixes the timestamps of those files, to ensure no
useless remake is triggered in a freshly cloned repository:

    #! /bin/sh
    # bootstrap.sh --- touch relevant files to avoid out-of-date issues
    #                  in Git sandboxes
    touch aclocal.m4
    find awklib -type f -print | xargs touch
    sleep 1
    touch configure
    sleep 2
    touch configh.in
    sleep 1
    touch test/Maketests
    find . -name Makefile.in -print | xargs touch
    touch doc/*.info
    touch po/*.gmo
    touch po/stamp-po
    touch awkgram.c
    touch command.c
    touch version.c

A similar, simplified script is also reported as an example in the
manual.

* NEWS: Update.
* doc/automake.texi (Auxiliary Programs, maintainer-mod): Update.
(CVS): Do not suggest that 'missing' can "automagically" fix botched
timestamp due to a "cvs update"; this isn't true anymore.  Give an
example of a custom 'fix-timestamp.sh' script that can be used to
obtain the same effect (in a slightly more laborious but also more
explicit and less brittle way).  Fix some minor typos and improper
wordings while we are at it.
* lib/missing: Basically rewritten to implement the new semantics.
As a side effect (one of the several), the '--run' option is no more
required nor recognized.
* m4/missing.m4 (AM_MISSING_HAS_RUN): Enhance the test on '$MISSING'
to ensure it actually provides the new semantics (by trying the new
"witness" option '--is-lightweight').
* lib/am/distdir.am (distdir): No need anymore to check for "bad"
distributed man pages that were actually dummy stubs generated by
the 'missing' script.
* t/missing4.sh: Rename ...
* t/remake-aclocal-version-mismatch.sh: ... like this.
* t/missing2.sh: Rename ...
* t/missing-version-mismatch.sh: ... like this, and adjust to the
new semantics.
* t/missing3.sh: Adjust to the new semantics.
* t/man4.sh: Remove as obsolete.
* t/missing.sh: Likewise.
* t/missing5.sh: Likewise.
* t/txinfo30.sh: Likewise.
* t/man6.sh: Adjust grepping checks.
* t/remake6.sh: Likewise.
* t/list-of-tests.mk: Adjust.

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>