platform/upstream/automake.git
12 years agomaint: support amending the generated ChangeLog, and fix a typo
Peter Rosin [Fri, 17 Feb 2012 08:52:07 +0000 (09:52 +0100)]
maint: support amending the generated ChangeLog, and fix a typo

* Makefile.am (gitlog_to_changelog_options): Add support for
amending the generated ChangeLog.
(EXTRA_DIST): Update.
* .git-log-fix: New file with things to amend to the generated
ChangeLog, starting with a fix for a typo in v1.11-1963-g3b369e6
"maint: use AC_PACKAGE_BUGREPORT to avoid duplication" from
yesterday.

12 years agocosmetics: normalize copyright notice in some tests
Stefano Lattarini [Thu, 16 Feb 2012 22:14:00 +0000 (23:14 +0100)]
cosmetics: normalize copyright notice in some tests

* tests/lisp3.test: Normalize copyright notice to read the
same of that of other tests.
* tests/lisp4.test: Likewise.
* tests/lisp5.test: Likewise.
* tests/lisp6.test: Likewise.
* tests/lisp7.test: Likewise.
* tests/lisp8.test: Likewise.
* tests/lispdry.test: Likewise.

12 years agoreadme: fix grammaro
Stefano Lattarini [Thu, 16 Feb 2012 21:30:52 +0000 (22:30 +0100)]
readme: fix grammaro

Reported by Eric Blake.

* README: Use "also has" instead of "has also"; the former sounds
better to a native speaker.

12 years agomaint: use AC_PACKAGE_BUGREPORT to avoid duplication
Stefano Lattarini [Thu, 16 Feb 2012 21:29:32 +0000 (22:29 +0100)]
maint: use AC_PACKAGE_BUGREPORT to avoid duplication

* configure.ac: In the message reporting whether the user is about
to build an alpha or beta version, use the autoconf-provided
AC_PACKAGE_BUGREPORT macro instead of duplicating the bur reporting
address.

12 years agoreadme: update and renew
Stefano Lattarini [Thu, 16 Feb 2012 20:54:51 +0000 (21:54 +0100)]
readme: update and renew

* README: Remove stale or now-obvious description and advices.
Add reference to the INSTALL file.  Some minor rewordings.

12 years agodepcomp tests: fix up today's botched commit
Stefano Lattarini [Thu, 16 Feb 2012 19:49:43 +0000 (20:49 +0100)]
depcomp tests: fix up today's botched commit

Today's commit 'v1.11-1959-g0699a84' has caused the generated
'depcomp*.tap' tests to call the 'plan_' function *before* it is
defined, and has also caused the extra checks required for better
libtool coverage to be run only when libtool is *not* in use,
rather than the other way around.  Fix this mess.

Report by Peter Rosin.

* tests/gen-testsuite-part: Include './defs' in the generated
tests, rather than doing so from 'depcomp.sh'.  Adjust the count
of TAP tests for 'depcomp-lt-auto.test' (it's 84, not 72).
* tests/depcomp.sh: Adjust accordingly, and fix inverted logic
about the decision of when to run extra checks for libtool.

12 years agobuild: clearer diagnostic if "make" is invoked before "./configure"
Stefano Lattarini [Thu, 16 Feb 2012 18:52:37 +0000 (19:52 +0100)]
build: clearer diagnostic if "make" is invoked before "./configure"

Since a GNUmakefile wrapper has been introduced in our build
system, a "make" invocation issued before a "./configure" one
has caused GNU make to die with the cryptic message:

  GNUmakefile:18: Makefile: No such file or directory
  GNUmakefile:19: /syntax-checks.mk: No such file or directory
  make: *** No rule to make target `/syntax-checks.mk'.  Stop.

* GNUmakefile: Detect when we are being run from an unconfigured
tree, and give helpful diagnostic.

12 years agodepcomp tests: put TAP plan in generated tests
Stefano Lattarini [Thu, 16 Feb 2012 18:08:58 +0000 (19:08 +0100)]
depcomp tests: put TAP plan in generated tests

This avoids a spurious maintcheck failure, and also simplifies
the 'depcomp.sh' helper script a little.

* tests/gen-testsuite-part: Create and place also a proper 'plan_'
call (to emit the TAP plan) in each generated 'depmod*.tap' test.
* tests/depcomp.sh: Remove 'plan_' invocations, and simplify a
little since we are at it.

12 years agoupdate-copyright: don't touch COPYING and INSTALL
Stefano Lattarini [Thu, 16 Feb 2012 17:53:09 +0000 (18:53 +0100)]
update-copyright: don't touch COPYING and INSTALL

Reported by Peter Rosin.

* update-copyright: Also exclude the COPYING and INSTALL files
found in the top-level directory.
* COPYING, INSTALL: Revert update of copyright years done in
today's commit 'v1.11-1948-g641a5a4'.

12 years agomaintcheck: whitelist some false positives
Stefano Lattarini [Thu, 16 Feb 2012 17:44:13 +0000 (18:44 +0100)]
maintcheck: whitelist some false positives

Instead of tweaking or dumbing down some of our sources or tests
in order not to make them spuriously trigger few maintainer checks,
we tweak such checks instead.

* syntax-checks.mk (sc_tests_overriding_macros_on_cmdline): Also
allow the variable 'exp' to be overridden on the make command line.
Whitelist the test 'make-dryrun.test' where appropriate.
(sc_mkinstalldirs): When whitelisting the 'mkinstalldirs' occurrence
in 'lib/Makefile.am', do not look for the exact line number: it is
obviously too fragile.

12 years agotests: avoid spurious failure with parallel make
Stefano Lattarini [Thu, 16 Feb 2012 12:36:25 +0000 (13:36 +0100)]
tests: avoid spurious failure with parallel make

* tests/parallel-tests-extra-programs.test: Run make with the '-k'
option where appropriate, to ensure it doesn't stop at the first
error, which would prevent the building of the extra programs we
expect it to build.

12 years agotests: avoid spurious failure on older Cygwin
Stefano Lattarini [Thu, 16 Feb 2012 11:30:23 +0000 (12:30 +0100)]
tests: avoid spurious failure on older Cygwin

* tests/tap-signal.tap: Sending a SIGQUIT on Cygwin 1.5 can cause a
segmentation fault instead (sometimes at least).  Don't let this
older bug pollute the results of our testsuite.

12 years agofixup: display captured make stdout in 'tap-signal.tap'
Stefano Lattarini [Thu, 16 Feb 2012 10:52:55 +0000 (11:52 +0100)]
fixup: display captured make stdout in 'tap-signal.tap'

12 years agotests: avoid spurious failure in 'suffix3.tap'
Stefano Lattarini [Thu, 16 Feb 2012 10:31:55 +0000 (11:31 +0100)]
tests: avoid spurious failure in 'suffix3.tap'

* tests/suffix3.tap (foo.zoo): This C++ file fails to compile with
older g++ (3.4.4) on Cygwin 1.5.25 if we #include <iostream>.  Don't
do that, since it's not strictly required, and the "using namespace"
directive is already enough to ensure the file contents is valid C++
but invalid C.

12 years agodocs: fix typo in description of AM_YFLAGS
Stefano Lattarini [Thu, 16 Feb 2012 10:09:50 +0000 (11:09 +0100)]
docs: fix typo in description of AM_YFLAGS

Report by Akim Demaille.

* doc/automake.texi (Program variables): Don't list "-d -t" twice
in the examples of valid ways to specify the '-d' flag to Yacc;
instead, use "-d -t" and "-t -d".  Add missing period.

12 years agotests: another spurious failure with older autoconf fixed
Stefano Lattarini [Thu, 16 Feb 2012 10:04:50 +0000 (11:04 +0100)]
tests: another spurious failure with older autoconf fixed

* tests/aclocal8.test (configure.in): Also call 'AC_INIT', it's
required by some older autoconf versions (e.g., 2.63).
* tests/acloca15.test: Likewise.  Add trailing ':' command since
we are at it.

12 years agotests: fix spurious failure with older autoconf
Stefano Lattarini [Thu, 16 Feb 2012 09:58:03 +0000 (10:58 +0100)]
tests: fix spurious failure with older autoconf

* tests/conffile-leading-dot.test: Relax grepping of 'config.status'
stderr, to cater for older autoconf.  Issue revealed by a failure
with autoconf 2.63 on Cygwin 1.5.25.

12 years agomaint: sync auxiliary files from upstream
Stefano Lattarini [Thu, 16 Feb 2012 09:51:23 +0000 (10:51 +0100)]
maint: sync auxiliary files from upstream

* lib/texinfo.tex: Synced from upstream, by "make fetch".
* lib/config.guess: Likewise.
* lib/config.sub: Likewise.

12 years agomaint: run "make update-copyright"
Stefano Lattarini [Thu, 16 Feb 2012 09:46:23 +0000 (10:46 +0100)]
maint: run "make update-copyright"

12 years agomaint: add some missing copyright notices
Stefano Lattarini [Thu, 16 Feb 2012 09:42:38 +0000 (10:42 +0100)]
maint: add some missing copyright notices

* tests/ChangeLog-old: Add copyright notice.
* tests/aclocal.in: Likewise.
* tests/automake.in: Likewise.
* tests/extract-testsuite-summary: Likewise.
* tests/prove-runner: Likewise.

12 years agoMerge branch 'maint'
Stefano Lattarini [Thu, 16 Feb 2012 09:35:19 +0000 (10:35 +0100)]
Merge branch 'maint'

* maint:
  update-copyright: don't touch files synced from external packages

12 years agoupdate-copyright: don't touch files synced from external packages
Stefano Lattarini [Thu, 16 Feb 2012 09:33:30 +0000 (10:33 +0100)]
update-copyright: don't touch files synced from external packages

* Makefile.am (update-copyright): Do not update copyright years of
files synced from external packages, as given by the '$(FETCHFILES)'
variable.  Silence the recipe since we are at it.

12 years agoMerge branch 'extra-dist-tests-ksh-bug'
Stefano Lattarini [Thu, 16 Feb 2012 09:09:48 +0000 (10:09 +0100)]
Merge branch 'extra-dist-tests-ksh-bug'

* extra-dist-tests-ksh-bug:
  tests: fix spurious failure when testing wildcards in EXTRA_DIST

12 years agotests: fix spurious failure when testing wildcards in EXTRA_DIST
Stefano Lattarini [Thu, 16 Feb 2012 09:05:35 +0000 (10:05 +0100)]
tests: fix spurious failure when testing wildcards in EXTRA_DIST

* tests/extra10.test: Remove the "make distcheck" call, since, at
least with GNU make 3.82, it trips on the fact that $(srcdir) is
not explicitly used in the wildcard in EXTRA_DIST.

12 years agoMerge branch 'maint'
Stefano Lattarini [Wed, 15 Feb 2012 18:32:07 +0000 (19:32 +0100)]
Merge branch 'maint'

* maint:
  fixup: distribute 'lib/update-copyright'

12 years agofixup: distribute 'lib/update-copyright'
Stefano Lattarini [Wed, 15 Feb 2012 18:00:10 +0000 (19:00 +0100)]
fixup: distribute 'lib/update-copyright'

While the 'update-copyright' script shouldn't be needed by final
users, that's not a good reason to keep it out by the distribution,
as doing so might be unhelpful toward occasional but curious users
interested in peeking into the automake build system.

* lib/Makefile.am (EXTRA_DIST): Distribute 'update-copyright'.

12 years agomaint: prefer $(GIT) over hard-coded "git" in maintainer recipes
Stefano Lattarini [Wed, 15 Feb 2012 17:47:15 +0000 (18:47 +0100)]
maint: prefer $(GIT) over hard-coded "git" in maintainer recipes

* Makefile.am (update-copyright, autodiffs): Use '$(GIT)' instead
of hard-coding 'git'.

12 years agoMerge branch 'maint'
Stefano Lattarini [Wed, 15 Feb 2012 17:40:06 +0000 (18:40 +0100)]
Merge branch 'maint'

* maint:
  maint: add a rule to use gnulib's update-copyright

12 years agoMerge branch 'extra-dist-tests-ksh-bug'
Stefano Lattarini [Wed, 15 Feb 2012 17:31:33 +0000 (18:31 +0100)]
Merge branch 'extra-dist-tests-ksh-bug'

* extra-dist-tests-ksh-bug:
  tests: avoid ksh bug for wildcards in EXTRA_DIST

12 years agoMerge branch 'yl-work-for-master'
Stefano Lattarini [Wed, 15 Feb 2012 17:29:57 +0000 (18:29 +0100)]
Merge branch 'yl-work-for-master'

* yl-work-for-master: (44 commits)
  tests: truly use Lex and Yacc selected by configure
  news: fix grammaros related to Yacc
  yacc/lex tests: avoid spurious skips with non-GNU make
  fixup: remove double news entry
  tests: workaround for shells with broken 'set -e'
  tests: avoid spurious failure with non-bison yacc
  tests: fix spurious failures due to missing 'yywrap()' function
  fixup: list of yacc/lex tests was botched
  tests: work around bug#7884 in many yacc/lex tests
  yacc/lex tests: remove an unneeded workaround for bug#8485
  yacc/lex tests: avoid too much failures with FreeBSD make
  yacc-dist-nobuild.test: add reference to bug#7884
  yacc tests: fix bug in 'yacc-cxx.test'
  lex tests: fix spurious link errors on Solaris
  lex: "make clean" removes .c files from non-distributed .l
  lex tests: make test on Lex dependency tracking more "semantic"
  lex tests: remove erroneous check about ylwrap distribution
  yacc tests: "make clean" removes C++ files from non-distributed .y
  tests: add a workaround for automake bug#8485
  tests: add a couple of inter-tests reference
  ...

12 years agocscope: is only expected to work with GNU make in VPATH setup
Stefano Lattarini [Wed, 15 Feb 2012 09:16:36 +0000 (10:16 +0100)]
cscope: is only expected to work with GNU make in VPATH setup

The 'cscope' functionality does not properly handle VPATH rewrites;
so we explicitly document that, for now, it is only ensured to work
with GNU make when doing a VPATH build, and we adjust testsuite
requirements accordingly.

Issue revealed by a failure of 'cscope.test' with Solaris 10 CCS
make.

* doc/automake.texi (Tags): Document the limitations of the cscope
support.  Couple of fixlets to formatting since we are at it.
* tests/cscope.test: Converted to TAP, and thus moved ...
* tests/cscope.tap: ... here.  Only run tests with VPATH builds when
using GNU make.  Adjust so that no C, C++, Fortran or Java compiler,
nor any Emacs program, will be required to run this test.
* tests/list-of-tests.mk: Adjust.

12 years agomaint: add a rule to use gnulib's update-copyright
Jim Meyering [Sun, 12 Feb 2012 15:57:42 +0000 (16:57 +0100)]
maint: add a rule to use gnulib's update-copyright

* lib/update-copyright: New file, from gnulib.
* Makefile.am (FETCHFILES): Add update-copyright to the list.
(fetch): Fetch it.
(update-copyright): New rule.

12 years agoMerge branch 'doc-no-history'
Stefano Lattarini [Tue, 14 Feb 2012 20:30:56 +0000 (21:30 +0100)]
Merge branch 'doc-no-history'

* doc-no-history:
  docs: move chapter on automake history out of main manual

12 years agocheck: fix test-suite.log formatting with NetBSD sed
Stefano Lattarini [Tue, 14 Feb 2012 20:23:04 +0000 (21:23 +0100)]
check: fix test-suite.log formatting with NetBSD sed

* lib/am/check.am (am__rst_section): Tweak to ensure en extra final
newline is printed also with NetBSD sed.  Issue revealed by a
failure of 'test-metadata-global-result.test'.
* tests/rst-formatting.test: New test, checking the internal
variables '$(am__rst_title)' and '$(am__rst_section)'.
* tests/list-of-tests.mk: Add it.

12 years agotests: avoid ksh bug for wildcards in EXTRA_DIST
Stefano Lattarini [Tue, 14 Feb 2012 18:26:29 +0000 (19:26 +0100)]
tests: avoid ksh bug for wildcards in EXTRA_DIST

Some shells, like NetBSD 5.1 /bin/ksh, have a bug that causes
wildcards resulting from an unquoted parameter expansion not to
be expanded as expected in some cases:

    $ touch a b c d
    $ /bin/sh -c 'var="[ab]" && echo $var' # As expected.
    a b
    $ /bin/ksh -c 'var="[ab]" && echo $var' # Oops.
    [ab]
    $ /bin/ksh -c 'var="?" && echo $var' # But this as expected.
    a b c d

This was causing a failure in our testsuite.  Work around that.

See also:
<http://lists.gnu.org/archive/html/automake-patches/2012-02/msg00149.html>

* tests/extra11.test: Work around the described issue by using the
$(wildcard) builtin in the EXTRA_DIST definition.  This is not a
problem, since this test was assuming GNU make anyway.  Since we are
at it, enhance coverage a little by also running "make distcheck".
* tests/extra10.test: Similarly, enhance coverage by also running
"make distcheck", and fix a minor bug in the process.  But continue
using a "bare" wildcard expression in EXTRA_DIST, without involving
the $(wildcard) builtin, to ensure coverage of similar usages "in
the wild".

12 years agoMerge branch 'fix-tap-signal-test'
Stefano Lattarini [Tue, 14 Feb 2012 13:28:57 +0000 (14:28 +0100)]
Merge branch 'fix-tap-signal-test'

* fix-tap-signal-test:
  fixup: fix test tap-signal.tap to avoid false negatives

12 years agofixup: fix test tap-signal.tap to avoid false negatives
Stefano Lattarini [Tue, 14 Feb 2012 13:28:34 +0000 (14:28 +0100)]
fixup: fix test tap-signal.tap to avoid false negatives

Problem introduced by yesterday commit v1.11-1851-g79b2c6a,
"tests: avoid yet other spurious failures on NetBSD"

* tests/tap-signal.tap: Truly ensure the exit status of the make
call under test is correctly reflected in the TAP result displayed
by the corresponding 'command_ok_' invocation.

12 years agoMerge branch 'maint'
Stefano Lattarini [Tue, 14 Feb 2012 13:07:12 +0000 (14:07 +0100)]
Merge branch 'maint'

* maint:
  fixup: do not tickle makefile-deps.test with the make_dryrun code
  gitattributes: custom merge driver for ChangeLog not needed anymore
  gitattributes: use "union" merge driver for NEWS

12 years agofixup: do not tickle makefile-deps.test with the make_dryrun code
Peter Rosin [Tue, 14 Feb 2012 11:55:32 +0000 (12:55 +0100)]
fixup: do not tickle makefile-deps.test with the make_dryrun code

* lib/am/header-vars.am (am__make_dryrun): Avoid code matching
'^ *:' in the Makefile, as that tickles makefile-deps.test.

12 years agogitattributes: custom merge driver for ChangeLog not needed anymore
Stefano Lattarini [Tue, 14 Feb 2012 12:25:35 +0000 (13:25 +0100)]
gitattributes: custom merge driver for ChangeLog not needed anymore

* .gitattributes: We don't maintain a version-controlled ChangeLog
file anymore, so we have no need to specify a custom merge driver
for it anymore.  Update accordingly.

12 years agogitattributes: use "union" merge driver for NEWS
Stefano Lattarini [Tue, 14 Feb 2012 12:21:26 +0000 (13:21 +0100)]
gitattributes: use "union" merge driver for NEWS

This should help in reducing the spurious merge conflicts for the
NEWS file, which have already caused a great deal of confusion and
wasted time.

Suggestion by Eric Blake:
http://lists.gnu.org/archive/html/automake-patches/2012-02/msg00119.html

* .gitattributes (NEWS): Use the "union" merge driver.

12 years agotests: truly use Lex and Yacc selected by configure
Stefano Lattarini [Tue, 14 Feb 2012 09:11:02 +0000 (10:11 +0100)]
tests: truly use Lex and Yacc selected by configure

When 'yacc-work' was merged into 'yl-work-for-master' in commit
v1.11-1910-ge6c40d4 (12-02-2012), the values for $YACC and $LEX
stopped being substituted directly by config.status, and started
being substituted by a Makefile rule using the contents of the
$(YACC) and $(LEX) makefile variables.

Unfortunately, our configure.ac was calling AM_SUBST_NOTMAKE on
'YACC' and 'LEX' (see commit v1.11-284-g34ca92b of 29-01-2011,
"tests: don't define YACC and LEX in the Makefiles", for a
rationale), so that the $(YACC) and $(LEX) in the Makefile simply
hold the default make-provided values (that is, "yacc" and "lex"
respectively), independently of what yacc and lex programs were
defined at configure time.

Apart from reducing coverage and creating confusion, this behaviour
also caused spurious failures on systems lacking a yacc and/or lex
programs.

Problem reported by Peter Rosin.  References:
 <http://lists.gnu.org/archive/html/automake-patches/2012-02/msg00131.html>
 <http://lists.gnu.org/archive/html/automake-patches/2012-02/msg00132.html>

* configure.ac (AM_SUBST_NOTMAKE): Don't call anymore on 'YACC' nor
on 'LEX'.

12 years agodepcomp tests: do not specify LDFLAGS for static libraries
Peter Rosin [Tue, 14 Feb 2012 01:56:39 +0000 (02:56 +0100)]
depcomp tests: do not specify LDFLAGS for static libraries

Commit v1.11-1848-gb3f34ca accidentally specified LDFLAGS
for libbaz even when built as a static library, which is
not allowed.

* tests/depcomp.sh (src/Makefile.am): Don't add any LDFLAGS
when libbaz is built as a static library.

12 years agodepcomp tests: avoid redundant runs for non-libtool test
Peter Rosin [Tue, 14 Feb 2012 01:51:55 +0000 (02:51 +0100)]
depcomp tests: avoid redundant runs for non-libtool test

When running the dependency tests without libtool, it's
not meaningful to run the tests three-fold, the libtool
configure options are simply ignored anyway.

* tests/depcomp.sh: Only run the tests three-fold when
libtool is in use.

12 years agotests: avoid yet other spurious failures on NetBSD
Stefano Lattarini [Mon, 13 Feb 2012 23:14:36 +0000 (00:14 +0100)]
tests: avoid yet other spurious failures on NetBSD

* tests/tap-signal.tap: Add a "strategically placed" extra 'echo'
command and a temporary silencing of xtraces; they are required
to avoid possible garbled output with NetBSD make, which would
miss some final newlines in the expected places and thus mess up
our TAP output.

12 years agotests: avoid a spurious failure on NetBSD
Stefano Lattarini [Mon, 13 Feb 2012 22:54:24 +0000 (23:54 +0100)]
tests: avoid a spurious failure on NetBSD

* tests/test-driver-is-distributed.test: Rewrite to avoid having to
edit configure.in; such editing was subtly botched on NetBSD (the
'AC_CONFIG_AUX_DIR' call got misplaced, ending up *before* the
'AC_INIT' call), and that caused an hard-to-track bug.  Since we
are at it, extend coverage a little.

12 years agotests: avoid spurious failure with NetBSD /bin/ksh
Stefano Lattarini [Mon, 13 Feb 2012 21:24:35 +0000 (22:24 +0100)]
tests: avoid spurious failure with NetBSD /bin/ksh

* tests/parallel-tests-fd-redirect-exeext.test (configure.in): Tweak
so that we don't end up with the generated configure script having
two nested subshells that start with '((':

  ((./conftest$EXEEXT 9>&1) | grep "^foobar") >&5 2>&5

which is unportable and could confuse some shells (e.g., NetBSD 5.1
/bin/ksh) into thinking we are trying to perform an arithmetic
operation.

12 years agotests: increase coverage for depcomp tests
Peter Rosin [Mon, 13 Feb 2012 20:21:48 +0000 (21:21 +0100)]
tests: increase coverage for depcomp tests

On platforms requiring that no undefined symbols exist in order
to build shared libraries (e.g. Windows DLLs), you have to
explicitly declare that the libtool library you are building
does not actually have any undefined symbols, for libtool to
even try to build it as a shared library.  Without that
explicit declaration, libtool falls back to a static library
only, regardless of any --enable-shared flags etc.

tests/depcomp.sh (Makefile.am): Add -no-undefined if a libtool
library (.la) is built.
(src/Makefile.am): Likewise.

12 years agonews: fix grammaros related to Yacc
Peter Rosin [Mon, 13 Feb 2012 20:13:12 +0000 (21:13 +0100)]
news: fix grammaros related to Yacc

* NEWS: Fix some grammaros and typos.

12 years agoyacc/lex tests: avoid spurious skips with non-GNU make
Stefano Lattarini [Mon, 13 Feb 2012 18:33:51 +0000 (19:33 +0100)]
yacc/lex tests: avoid spurious skips with non-GNU make

* tests/defs (useless_vpath_rebuild): Fix botched logic that
was causing this function to always diagnose non-GNU make
implementations as being affected by the "useless rebuilds
in VPATH setup" bug (that affects FreeBSD make and causes
automake bug#7884).

12 years agofixup: remove double news entry
Peter Rosin [Mon, 13 Feb 2012 15:43:34 +0000 (16:43 +0100)]
fixup: remove double news entry

* NEWS: Remove double (stale) news entry introduced by a botched
merge.

12 years agotests: workaround for shells with broken 'set -e'
Stefano Lattarini [Sun, 12 Feb 2012 17:03:08 +0000 (18:03 +0100)]
tests: workaround for shells with broken 'set -e'

* tests/dist-formats.tap: Some versions of the BSD shell wrongly
bail out when the 'errexit' shell flag is active and the left-hand
command in a "&&" list fails and that list is the *last* command
of a "case" statement.  This was causing an incorrect initialization
of the '$missing_compressors' variable, and thus potential spurious
failures when non-existing programs were assumed to be available.

12 years agotests: workaround for shells with broken 'set -e'
Stefano Lattarini [Sun, 12 Feb 2012 16:16:54 +0000 (17:16 +0100)]
tests: workaround for shells with broken 'set -e'

* tests/yacc-cxx.test: Some versions of the BSD shell wrongly bail
out when the 'errexit' shell flag is active if the left-hand
command in a "&&" list fails and such list is the *last* command
of a "for" or "while" loop or of an "if" construct.  Work around
this issue.
* tests/check12.test: Likewise.

12 years agotests: avoid spurious failure with non-bison yacc
Stefano Lattarini [Sun, 12 Feb 2012 16:02:33 +0000 (17:02 +0100)]
tests: avoid spurious failure with non-bison yacc

Issue revealed by a failure on NetBSD 5.1.

* tests/suffix10.tap (Makefile.am): Adjust the rule generating
the '.y' files so that such files won't use bison-only features.

12 years agotests: fix spurious failures due to missing 'yywrap()' function
Stefano Lattarini [Sun, 12 Feb 2012 15:37:44 +0000 (16:37 +0100)]
tests: fix spurious failures due to missing 'yywrap()' function

The AC_PROG_LEX Autoconf macro does not diagnose a failure to find
the "lex library" expected to provide a 'yywrap' function (function
which is required to link most lex-generated programs).  On the
contrary, when all the link attempts (i.e., with '-ll' and '-lfl')
fail, configure declares that no lex library is needed, and simply
proceeds with the configuration process -- only for the build to
possibly fail later, at make time.

This behaviour is intended; the Autoconf manual reads:

  You are encouraged to use Flex in your sources, since it is
  both more pleasant to use than plain Lex and the C source it
  produces is portable.  In order to ensure portability, however,
  you must either provide a function 'yywrap' or, if you don't use
  it (e.g., your scanner has no '#include'-like feature), simply
  include a '%noyywrap' statement in the scanner's source.

This AC_PROG_LEX behaviour is causing some spurious failures of
the Automake testsuite in environments which lack a proper library
providing 'yywrap' (this happens for example on Fedora-based
systems).   The proper workaround is to simply provide a fall-back
implementation of 'yywrap' in our lexers.

See also similar commits 'v1.11-546-gca0ba5d' (24-10-2011),
'v1.11-1085-gb5c3968' (24-10-2011) and 'v1.11-871-geb147a1'
(25-05-2011).

* tests/lex-clean.test: Provide a dummy 'yywrap' function.
* tests/lex-line.test: Likewise.
* tests/lex-nodist.test: Likewise.
* tests/lex-depend.test: Likewise.
* tests/lex-clean-cxx.test: Move the dummy 'yywrap' function
from the main '.cc' file into the '.lxx' file, so that it won't
be subject to the namespace declaration in the '.cc' file (which
was causing a spurious link error in systems without a default
"lex library").

12 years agoMerge branch 'yacc-work' into yl-work-for-master
Stefano Lattarini [Sun, 12 Feb 2012 14:06:17 +0000 (15:06 +0100)]
Merge branch 'yacc-work' into yl-work-for-master

* yacc-work: (37 commits)
  fixup: list of yacc/lex tests was botched
  tests: work around bug#7884 in many yacc/lex tests
  yacc/lex tests: remove an unneeded workaround for bug#8485
  yacc/lex tests: avoid too much failures with FreeBSD make
  yacc-dist-nobuild.test: add reference to bug#7884
  yacc tests: fix bug in 'yacc-cxx.test'
  lex tests: fix spurious link errors on Solaris
  lex: "make clean" removes .c files from non-distributed .l
  lex tests: make test on Lex dependency tracking more "semantic"
  lex tests: remove erroneous check about ylwrap distribution
  yacc tests: "make clean" removes C++ files from non-distributed .y
  tests: add a workaround for automake bug#8485
  tests: add a couple of inter-tests reference
  lex tests: require just `lex' instead of `flex'
  fix typo in ChangeLog (2011-05-04)
  tests defs: use `skip_' for skipping yacc/lex related tests
  lex/yacc tests: remove redundant $distdir definition
  coverage: test lex-generated "#line" directives postprocessing
  tests: minor improvements to a couple of yacc tests
  tests: fix spurious failure in test 'yacc-d-cxx.test'
  ...

+ Extra non-trivial edits:

* tests/defs.in: Delete; the differences from maint has been
merged into 'tests/defs' and 'tests/defs-static.in'.
* tests/defs (yacc, lex): Use 'skip_all_', not 'skip_', to
skip the whole test case if yacc (resp. lex) is missing.
(bison): New, set up the environment so that 'bison -y' will
be used as the yacc program.
(useless_vpath_rebuild, yl_distcheck): Moved in from
'tests/defs.in'.
* tests/defs-static.in ($YACC, $LEX): Default to the values
determined at configure time, and allow them to be overridden
by the more namespace-safe variables '$AM_TESTSUITE_YACC' and
'$AM_TESTSUITE_LEX' respectively.
* tests/Makefile.am (do_subst): Also substitute '@YACC@' and
'@LEX@'.
* Several tests: Fix requirements declarations, by preferring
'lex' and 'yacc' over 'flex' and 'bison' whenever possible.

12 years agofixup: list of yacc/lex tests was botched
Stefano Lattarini [Sun, 12 Feb 2012 11:06:35 +0000 (12:06 +0100)]
fixup: list of yacc/lex tests was botched

* tests/list-of-tests.mk: Update to take into account the addition,
renaming, removing or split-ups of Yacc/Lex tests that have taken
place in the 'yacc-work' branch.  Problem likely introduced by a
botched merge of 'maint' into 'yacc-work'.

12 years agodocs: move chapter on automake history out of main manual
Stefano Lattarini [Sun, 12 Feb 2012 10:02:32 +0000 (11:02 +0100)]
docs: move chapter on automake history out of main manual

The chapter on Automake history, while certainly interesting and
even fascinating, does not truly pertain to a reference manual,
so move it out from there and into its own dedicated file.  This
change is made more advisable and pressing by the fact that such
and "Automake history" chapter hasn't been updated since the 1.9.6
release, so it has been becoming less faithful and useful since
then.

* doc/history.texi: New, manual on the history of the automake
package; extracted from ...
* doc/automake.texi: ... this file, with related adjustments.
* doc/Makefile.am (info_TEXINFOS): Add 'history.texi'.
(history_TEXINFOS): New, list included file 'fdl.texi'.
* Makefile.am (release-stats): Remove as obsolete.
* HACKING (Release Procedure): Don't advise anymore to run the
"release-stats" target and to update the manual with its output.
* NEWS: Update.
* .gitignore: Likewise.

12 years agodepcomp tests: avoid redundant runs for libtool tests
Stefano Lattarini [Wed, 8 Feb 2012 12:21:58 +0000 (13:21 +0100)]
depcomp tests: avoid redundant runs for libtool tests

When running libtool-oriented tests, our 'depcomp.sh' script used
to run the same checks thrice: once after having run configure
with the '--disable-shared' option, once after having run it with
the '--enable-shared' option, and once by allowing configure to
automatically select which kind of library (or libraries) to build.

This was done to offer extra coverage for the less-common depmodes
(like "aix" of "hp2") where the name of the compiler-generated
depfiles can depend on whether libtool is in use *and* on which
kind of libraries libtool is building (static, shared, or both).
About this, see commit 'Release-1-10-24-ge89ec38' of 28-03-2007,
"* lib/depcomp (aix): Rewrite depmode in the spirit of the tru64
one".

But that extra coverage came at the price of *considerably* slowing
down the depcomp libtool-oriented tests, since for each of them the
tested source tree was configured and built *twelve* times (rather
than "just" four as it is for the non-libtool case).

So, to strike a balance between coverage and speed, we now run the
libtool-oriented tests with the three different configuration modes
*only* when it is possible that the depmode that will get selected
is one of those which can actually benefit from the extra coverage.

* tests/depcomp.sh: Adjust to only run the threefold libtool tests
when that can truly be potentially useful.  Add related explanatory
comments.

12 years agotests: avoid wrong skips in dist-formats.tap
Stefano Lattarini [Thu, 9 Feb 2012 18:49:18 +0000 (19:49 +0100)]
tests: avoid wrong skips in dist-formats.tap

* tests/dist-formats.tap: The test checking whether the 'compress'
program is actually capable of compressing files relied on the
assumption that 'compress' exits with status zero if no problem
occurs; alas, this reasonable assumption doesn't hold in practice,
since 'compress' does (and is documented to) exit with status 2 if
the output is larger than the input after (attempted) compression!
Fix this by using and input that 'compress' can actually reduce in
size when compressing.
Do some related reformatting of surrounding code since we are at it.

12 years agotests: few tweakings and cosmetic changes
Stefano Lattarini [Thu, 9 Feb 2012 18:06:06 +0000 (19:06 +0100)]
tests: few tweakings and cosmetic changes

* tests/dist-formats.tap: Fix botched spacing.
* tests/subobjname.test: Prefer spaces to tabs in indentation.
* tests/cond43.test: Likewise.
* tests/comment7.test: Likewise.
* tests/compile_f90_c_cxx.test: Use "$tab" instead of literal
tab characters in the grep regexp.
* tests/compile_f_c_cxx.test: Likewise.
* tests/pluseq3.test: Likewise.
* tests/cond-basic.test: Likewise.
* tests/acloca16.test: Add empty line before trailing ':' command.
* tests/bsource.test: Likewise.
* tests/depend5.test: Likewise.
* tests/depend6.test: Likewise.
* tests/destdir.test: Likewise.
* tests/fort2.test: Likewise.
* tests/instdir-java.test: Likewise.
* tests/instdir-lisp.test: Likewise.
* tests/instdir-python.test: Likewise.
* tests/instdir.test: Likewise.
* tests/instdir2.test: Likewise.
* tests/ltinstloc.test: Likewise.
* tests/missing.test: Likewise.
* tests/missing2.test: Likewise.
* tests/nodef.test: Likewise.
* tests/nodef2.test: Likewise.
* tests/subst4.test: Likewise.
* tests/werror3.test: Likewise.
* tests/commen11.test: Likewise.  Also, make grepping of automake
stderr slightly stricter, and properly quote strings with shell
metacharacters.
* tests/nodep2.test: Add empty line before trailing ':' command.
Do not create unneeded dummy source files.

12 years agotests: remove a couple of redundant 'set -e' calls
Stefano Lattarini [Thu, 9 Feb 2012 17:17:54 +0000 (18:17 +0100)]
tests: remove a couple of redundant 'set -e' calls

* tests/conffile-leading-dot.test: Do not set the 'errexit'
shell flag, as it is already set by 'tests/defs'.
* tests/make-dryrun.test: Likewise.

12 years agoMerge branch 'maint'
Stefano Lattarini [Thu, 9 Feb 2012 17:15:43 +0000 (18:15 +0100)]
Merge branch 'maint'

* maint:
  tests: fix a timestamp-related spurious failures
  dryrun: fix regression with '$(am__make_dryrun)'
  test defs: function 'is_newest' now works also with directories

12 years agoMerge branch 'dryrun-fix' into maint
Stefano Lattarini [Thu, 9 Feb 2012 17:07:13 +0000 (18:07 +0100)]
Merge branch 'dryrun-fix' into maint

* dryrun-fix:
  dryrun: fix regression with '$(am__make_dryrun)'

12 years agotests: check if 'compress' is real or fake
Peter Rosin [Thu, 9 Feb 2012 09:25:20 +0000 (10:25 +0100)]
tests: check if 'compress' is real or fake

On Cygwin, 'compress' is provided by sharutils and is just a
dummy script that is not able to actually compress (it can
only decompress).  This fake 'compress' is not usable for
our purpose - to create compressed tarballs.

* tests/dist-formats.tap (missing_compressors): Count 'compress'
as missing if it does not support the -c option.

12 years agoMerge branch 'msvc'
Peter Rosin [Wed, 8 Feb 2012 14:12:40 +0000 (15:12 +0100)]
Merge branch 'msvc'

* msvc:
  depcomp: try to prevent whitespace regressions
  depcomp: recognize tabs as whitespace in the dashmstdout mode
  depcomp: quote 'like this', not `like this'

12 years agodepcomp tests: avoid spurious failures with 'dashXmstdout' depmode
Stefano Lattarini [Wed, 8 Feb 2012 13:29:01 +0000 (14:29 +0100)]
depcomp tests: avoid spurious failures with 'dashXmstdout' depmode

* tests/gen-testsuite-part: The 'dashXmstdout' depmode cannot be
truly forced on gcc (like we were trying to do, causing spurious
failures in the process); so don't do that.  This change shouldn't
actually reduce coverage anyway, since, as the comments in
'lib/depcomp' say, the 'dashXmstdout' depmode is just like
the 'dashmstdout' one, only with a different argument for the
compiler.

12 years agodepcomp: try to prevent whitespace regressions
Peter Rosin [Fri, 3 Feb 2012 15:10:52 +0000 (16:10 +0100)]
depcomp: try to prevent whitespace regressions

Suggested by Stefano Lattarini.

* lib/depcomp: Add $tab and $nl variables and use them
throughout.

12 years agodepcomp: recognize tabs as whitespace in the dashmstdout mode
Peter Rosin [Fri, 3 Feb 2012 07:54:49 +0000 (08:54 +0100)]
depcomp: recognize tabs as whitespace in the dashmstdout mode

Commit Release-1-7-2b-2-gf03ceab "Cope with DOS filenames in
dependencies." inadvertedly converted tabs into spaces.

* lib/depcomp (dashmstdout): Add a tab character to all sets
matching whitespace.

12 years agodepcomp: quote 'like this', not `like this'
Peter Rosin [Wed, 8 Feb 2012 13:40:15 +0000 (14:40 +0100)]
depcomp: quote 'like this', not `like this'

Cherry-picked from recent changes from master.

* lib/depcomp: Quote 'like this', not `like this'.

12 years agotests: check the depmodes 'msvisualcpp' and 'msvcmsys'
Peter Rosin [Wed, 8 Feb 2012 12:35:32 +0000 (13:35 +0100)]
tests: check the depmodes 'msvisualcpp' and 'msvcmsys'

* tests/defs (cygpath): New requirement, checking that cygpath
is working.
(mingw): New requirement, checking that the build system is
MSYS (in its normal MinGW mode).
* tests/gen-testsuite-part (depmodes): Add entries for depmodes
'msvisualcpp' and 'msvcmsys'.

12 years agotests: better way to compare lists in Makefile rules
Stefano Lattarini [Mon, 6 Feb 2012 14:48:30 +0000 (15:48 +0100)]
tests: better way to compare lists in Makefile rules

With this commit, we introduce a new helper shell script for use
in the testsuite, which is meant to allow the test cases to easily
check whether two whitespace-separated lists are equal; this ability
is particularly useful to check for equality of the contents of make
variables that are expected to contain multiple whitespace-separated
words, and are defined through line continuations (or are rewritten
by automake in this way), or that contain expansion of potentially
empty variables.

Before this change, a test checking that an usage like this one:

  VAR = valA
  if COND1
    VAR += val1 # com1
  endif COND1
  VAR += valC

worked as expected, couldn't use rules like:

  ## Doesn't work because $(VAR) expands to multiple words
  verify:
      test $(VAR) = "valA val1 valC"

nor like:

  ## Doesn't work because the final expansion of $(VAR) contains
  ## repeated contiguous whitespace characters (it actually
  ## equals "valA val1  valC", not "valA val1 valC"), and this
  ## is an internal detail which might change and which we don't
  ## want to explicitly rely on.
  verify:
      test "$(VAR)" = "valA val1 valC"

Instead, we had to rely on cumbersome workaround such as:

  ## This works, but is ugly.
  verify:
      test "`echo $(VAR)`" = "valA val1 valC"

or:

  ## This works, but is even uglier.
  verify:
      echo BEG: $(VAR) :END | grep "BEG: valA val1 valC :END"

Now, with the help of the new 'is' script, we can perform such a
check in a clearer and more straightforward way, as in:

  ## Works, and reads clearly.
  verify:
      is $(VAR) == valA val1 valC

* tests/is: New helper shell script, telling whether two whitespace
separated lists are equal.
* Makefile.am (EXTRA_DIST): Add it.
* tests/colneq2.test: Use the new helper script, and accordingly
get rid of older, more cumbersome idioms.
* tests/cond11.test: Likewise.
* tests/cond16.test: Likewise.
* tests/cond18.test: Likewise.
* tests/cond22.test: Likewise.
* tests/cond31.test: Likewise.
* tests/cond38.test: Likewise.
* tests/test-logs-repeated.test: Likewise.
* tests/objext-pr10128.test: Likewise.
* tests/programs-primary-rewritten.test: Likewise.
* tests/substre2.test: Likewise.  Also ...
(configure.in, Makefile.am): Add a couple of hack to avoid having
to require (and run) a C compiler; accordingly ...
($required): ... remove this.
* tests/exeext4.test: Likewise.
* tests/substref.test: Likewise.  Also ...
(hello.c): Use ": >" rather than "cat <<EOF" to generate it,
since it's meant to be empty anyway.
* tests/cond4.test: Use the new helper script, and accordingly
get rid of older, more cumbersome idioms.  Avoid some unnecessary
uses of "make -e" since we are at it.
* tests/cond19.test: Likewise.
* tests/cond32.test: Likewise.
* tests/cond6.test: Use the new helper script, and accordingly
move some checks in the Makefile.am.
Avoid unnecessary execution of automake remake rules by manually
"touching" aclocal.m4

12 years agotests: improve and rework tests on dependency tracking
Stefano Lattarini [Fri, 3 Feb 2012 14:05:48 +0000 (15:05 +0100)]
tests: improve and rework tests on dependency tracking

Fixes automake bug#10434.  Suggestion by Peter Rosin.

The 'depcomp.tap' test case worked by trying to unconditionally
force the compiler in use by the testsuite to use, one by one, *all*
the dependency modes known by the 'depcomp' script, and, for each
such forced mode that was compatible enough with said compiler not
to cause breakage in the basic compilation rules, checking that it
was *also* good enough not to break remake rules in VPATH builds.

This seemed a good approach when this test was first introduced, as
it apparently increased coverage for the less used and less tested
dependency-tracking modes.  But in the log run it turned out the
approach was actually in part too brittle, causing some annoying
spurious failures (as with the Tru64 depmode forced on GCC, see
automake bug#10434), and partly too forgiving, since, for some of
the more corner-case dependency modes, the 'depcomp' script simply
reverts to silently disabling dependency tracking when an error is
encountered (this happened e.g., with the Tru64 depmode forced on
the Sun C compiler 5.9), so that a passing test means nothing, and
only gives a false sense of security.

As Peter Rosin put it, "it's just dead wrong to assume that feeding
-M or -xM to the compiler (or whatever other random stuff 'depcomp'
might do) and not get an error is the same as dependencies magically
appearing".

So we get rid of this wrong approach, and in the process proceed to
a complete overhaul of many of the tests on automatic dependency
tracking, extending the offered coverage and rationalizing their
organization.

* tests/depcomp.sh: New helper script, used by several new
autogenerated tests.
* tests/gen-testsuite-part: Generate several tests based on the
new 'depcomp.sh' script.  Emit makefile code that declares their
dependency on that script, and that extends EXTRA_DIST in order
to distribute it.
* tests/depmod.tap: Remove.
* tests/depend2.test: Remove, it has been subsumed by the new
autogenerated test 'depcomp-disabled.tap'.
* tests/depcomp3.test: Remove, it has been subsumed by the new
autogenerated test 'depmod-dashmstdout.tap'.
* tests/depcomp3.test: Remove, it has been subsumed by the new
autogenerated test 'depmod-lt-makedepend.tap'.
* tests/depcomp6.test: Remove, it has been subsumed by the new
autogenerated test 'depmod-auto.tap'.
* tests/depcomp7.test: Remove, it has been subsumed by the new
autogenerated test 'depmod-lt-auto.tap'.
* tests/depcomp5.test: Remove as obsolescent.
* test/list-of-tests.mk: Adjust.
* .gitignore: List the new autogenerated tests.

12 years agotests: fix a timestamp-related spurious failures
Stefano Lattarini [Tue, 7 Feb 2012 18:53:49 +0000 (19:53 +0100)]
tests: fix a timestamp-related spurious failures

Fixes automake bug#10737.  Report from Larry Daniel.
See also automake bug#8365 and commit 'v1.11-329-gd4df619' of
30-03-2011, "tests: fix timestamp-related failures".

* tests/aclocal5.test: Sleep before modifying m4 files that should
trigger remake rules.  This fixes an hard-to-hit timestamp-related
race condition.
* THANKS: Update.

12 years agodryrun: fix regression with '$(am__make_dryrun)'
Stefano Lattarini [Tue, 7 Feb 2012 10:12:59 +0000 (11:12 +0100)]
dryrun: fix regression with '$(am__make_dryrun)'

In commit v1.11-683-gda0964e of 05-02-2012, we introduced a new
variable '$(am__make_dryrun)' that could be used in recipes to
determine whether make is running in dry mode (e.g., as with
"make -n").  Unfortunately, the idiom we used fails to take into
account the case in which $(MAKEFLAGS) contains one or more variable
definitions whose value is a whitespace-separated list; for example,
if we invoke make as:

  make check TESTS="n1.test n2.test"

then the better make implementations out there (at least modern
GNU make and BSD make) will export MAKEFLAGS to the following
value:

  TESTS=n1.test\ n2.test

So a shell loop like the one we used in $(am__make_dryrun):

  for flag in $$MAKEFLAGS; do ...

won't behave as expected: the shell word-splitting rules will break
up the entry for TESTS into the two distinct entries "TESTS=n1.test\"
and "n2.test", and this second entry will goad our $(am__make_dryrun)
code into thinking that make is performing a dry run!

So now we simply loop over the expanded value of $(MAKEFLAGS).
This solves the regression, but alas, is more brittle in case the
users passes on the command line a macro value containing unbalanced
" or ' quotes, or shell metacharacters like, say, '`' or '('.  This
should almost never happen though, so we don't worry about it now;
we will revisit the issue only when and if we receive bug reports in
this area.

* lib/am/header-vars.am (am__make_dryrun): Fix.
* tests/make-dryrun.test: New test.
* tests/list-of-tests.mk: Add it.

12 years agotests: work around bug#7884 in many yacc/lex tests
Stefano Lattarini [Tue, 7 Feb 2012 08:30:37 +0000 (09:30 +0100)]
tests: work around bug#7884 in many yacc/lex tests

Due to automake bug#7884, many test cases on Yacc/Lex support are
failing when run with FreeBSD make.  Since these failures are all
due to the same bug, and that bug is well understood and already
explicitly exposed in the dedicated 'yacc-dist-nobuild.test' test,
the reported failures are mostly noise, that not only is annoying,
but which might end up covering different real bugs or regressions.

Thus we minimize such spurious failures, by ensuring the commands
triggering them (most of them being "make distcheck" invocations)
will be skipped when $MAKE suffers of the bug/limitation that
triggers automake bug#7884.

* tests/defs.in (useless_vpath_rebuild): New function.
(yl_distcheck): Likewise.
* tests/lex3.test, tests/subpkg-yacc.test, tests/yacc-basic.test,
tests/yacc-cxx.test, tests/yacc-d-basic.test, tests/yacc-d-cxx.test,
tests/yacc-dist-nobuild-subdir.test : Use them to avoid extra
failures caused by automake bug#7884.  Where possible, throw in
some related simplifications.

12 years agoMerge branch 'maint' into yacc-work
Stefano Lattarini [Mon, 6 Feb 2012 22:17:32 +0000 (23:17 +0100)]
Merge branch 'maint' into yacc-work

* maint: (75 commits)
  test defs: function 'is_newest' now works also with directories
  refactor: new variable telling whether make is running in "dry mode"
  ...

12 years agotest defs: avoid spurious XPASS results with NetBSD make
Stefano Lattarini [Mon, 6 Feb 2012 22:02:32 +0000 (23:02 +0100)]
test defs: avoid spurious XPASS results with NetBSD make

* tests/defs (make_can_chain_suffix_rules): Ensure to properly
declare the '.SUFFIXES:' in the temporary Makefile used to check
whether $MAKE is able to automatically chain suffix rules.  This
avoids spurious XPASS results with (at least) NetBSD make in some
'suffix*.tap' tests; in a sense also, this also makes the probing
of $MAKE capabilities more faithful, since the Automake-generated
Makefiles are expected to properly declare the '.SUFFIXES:' as
well.

12 years agocosmetics: few whitespace fixlets
Stefano Lattarini [Mon, 6 Feb 2012 21:45:47 +0000 (22:45 +0100)]
cosmetics: few whitespace fixlets

12 years agocosmetics: various typofixes
Stefano Lattarini [Mon, 6 Feb 2012 21:06:18 +0000 (22:06 +0100)]
cosmetics: various typofixes

Several typofixes in documentation and comments, as
suggested by the "codespell.py" script.  Reference:
<http://git.profusion.mobi/cgit.cgi/lucas/codespell/>

12 years agocosmetics: convert encoding from ISO-8859 to UTF-8 in some tests
Stefano Lattarini [Mon, 6 Feb 2012 20:54:36 +0000 (21:54 +0100)]
cosmetics: convert encoding from ISO-8859 to UTF-8 in some tests

The changed files have been converted using iconv; specifically,
the command "iconv --from-code=ISO-8859-1 --to-code=UTF-8".

* tests/block.test, tests/tagsub.test: Converted to UTF-8 encoding.

12 years agotest defs: remove obsolete requirement 'rst2html'
Stefano Lattarini [Mon, 6 Feb 2012 21:28:20 +0000 (22:28 +0100)]
test defs: remove obsolete requirement 'rst2html'

* tests/defs (rst2html): Remove, it's not needed anymore now that
the old code supporting the ".log -> .html" conversion for the
parallel-tests harness has been moved in contrib.  This removal
should have actually be done in commit v1.11-1757-g0a9d201 of
17-01-2012, 'check: move ".log -> .html" conversion in contrib'.

12 years agotests: workaround for shells with broken 'set -e'
Stefano Lattarini [Mon, 6 Feb 2012 18:43:34 +0000 (19:43 +0100)]
tests: workaround for shells with broken 'set -e'

* tests/defs (gmake, native, rst2html): Some versions of the BSD
shell wrongly bail out when the 'errexit' shell flag is active and
the left-hand command in a "&&" list fails, if that list is the
*last* command of a "for" or "while" loop.  Work around this issue.
* tests/lex3.test: Likewise.
* tests/check12.test: Likewise.
* tests/yacc-basic.test: Likewise.
* tests/lex-noyywrap.test: Likewise.
* tests/parallel-tests2.test: Likewise.
* tests/lex-lib-external.test: Likewise.
* tests/check-no-test-driver.test: Likewise.
* tests/test-metadata-recheck.test: Likewise.
* tests/parallel-tests-dry-run-1.test: Likewise.
* tests/parallel-tests-dry-run-2.test: Likewise.
* tests/parallel-tests-unreadable.test: Likewise.
* tests/test-driver-custom-no-extra-driver.test: Likewise.

Problem revealed by spurious testsuite failures on a NetBSD 5.1
system and an OpenBSD 5.0 system.

12 years agocosmetics: fix a typo in comments
Stefano Lattarini [Mon, 6 Feb 2012 18:26:12 +0000 (19:26 +0100)]
cosmetics: fix a typo in comments

* tests/extra-programs-empty.test: Fix typo in heading comments.

12 years agotest defs: function 'is_newest' now works also with directories
Stefano Lattarini [Sat, 23 Jul 2011 11:55:20 +0000 (13:55 +0200)]
test defs: function 'is_newest' now works also with directories

Reported by Jim Meyering against automake master (see bug#9147) and
by Adam Sampson against automake 1.11.3 (see bug#10730).

* tests/defs (is_newest): Call 'find' with the '-prune' option,
so that it won't descend in the directories (which could cause
spurious results).
* THANKS: Update.

Backported from commit v1.11-914-gb6a40fa (originally on master).

12 years agoparallel-tests: more uses for '$(am__make_dryrun)'
Stefano Lattarini [Sun, 5 Feb 2012 20:22:01 +0000 (21:22 +0100)]
parallel-tests: more uses for '$(am__make_dryrun)'

With this change we refactor some recipes of the parallel-tests
harness to make them use, where appropriate, the new internal
variable '$(am__make_dryrun)' (introduced in the 'maint' branch)
when they need to determine whether make is running in "dry mode",
i.e., with "make -n".  This allows for some simplifications and
for improved uniformity.

* lib/am/check.am (check-TESTS recheck): Use $(am__make_dryrun) and
simplify accordingly.
(am--redo-logs): Delete this internal helper recipe, merged into ...
($(TEST_SUITE_LOG)): ... this, with the help of $(am__make_dryrun).
recipe accordingly.

12 years agoMerge branch 'maint'
Stefano Lattarini [Sun, 5 Feb 2012 17:37:45 +0000 (18:37 +0100)]
Merge branch 'maint'

* maint:
  refactor: new variable telling whether make is running in "dry mode"
  tests: do not clobber the modified CC

12 years agorefactor: new variable telling whether make is running in "dry mode"
Stefano Lattarini [Mon, 23 Jan 2012 20:02:05 +0000 (21:02 +0100)]
refactor: new variable telling whether make is running in "dry mode"

We define a new variable '$(am__make_dryrun)', that can be used
in recipes to determine whether make is running in "dry mode" (as
with "make -n") or not.  This is useful in rules that invoke make
recursively, and are thus executed also with "make -n" -- either
because they are declared as dependencies to '.MAKE' (NetBSD make)
or because their recipes contain the "$(MAKE)" string (GNU and
Solaris make).

* lib/am/header-vars.am (am__make_dryrun): New variable.
* lib/am/check.am (check-TESTS recheck): Use it, and simplify
recipe accordingly.
* lib/am/distdir.am (distdir): Likewise.
* lib/am/lisp.am ($(am__ELCFILES)): Likewise.

12 years agotests: do not clobber the modified CC
Peter Rosin [Thu, 2 Feb 2012 20:08:46 +0000 (21:08 +0100)]
tests: do not clobber the modified CC

If CC is originally a losing compiler, AM_PROG_CC_C_O will
modify CC.  "$MAKE -e" will then clobber this modified CC
and reintroduce the raw losing compiler causing the test
to fail, as subdir-objects is in effect.

tests/check8.test: Drop -e from the $MAKE invocation, since
AM_COLOR_TESTS is not specified in the Makefile and -e is
therefore not needed.

12 years agocosmetics: fix indentation and typos in perl TAP driver
Stefano Lattarini [Thu, 2 Feb 2012 19:14:30 +0000 (20:14 +0100)]
cosmetics: fix indentation and typos in perl TAP driver

* lib/tap-driver.pl (get_test_exit_message): Fix botched
indentation.  Fix typo in error message: s/ststus/status/.

12 years agotest defs: fix typo in variable name ($AM_TESTSUITE_PERL)
Stefano Lattarini [Thu, 2 Feb 2012 18:07:51 +0000 (19:07 +0100)]
test defs: fix typo in variable name ($AM_TESTSUITE_PERL)

* tests/defs-static.in: Fix typo: it's '$AM_TESTSUITE_PERL',
not '$AM_TESTUITE_PERL'.

12 years agotap/perl: handle missing or non-executable scripts better
Stefano Lattarini [Thu, 2 Feb 2012 13:51:59 +0000 (14:51 +0100)]
tap/perl: handle missing or non-executable scripts better

This change improves how our Perl-based TAP driver handles
non-runnable test scripts (meaning they might be not executable,
or not readable, or even not exist).  In particular, it makes the
driver deterministically display a clear "ERROR" result instead
of possibly dying with diagnostic from 'TAP::Parser' internals,
and prevents it from displaying spurious "missing TAP plan" errors.

Moreover, with this change, some testsuite failures present only
with newer perl versions (e.g., 5.14) are fixed.  See automake
bug#10418.

* tests/tap-bad-prog.tap: When testing the perl implementation of
the TAP driver, and when the perl interpreter offers a good-enough
'IPC::Open3::open3' function, expect it not to display spurious
"missing TAP plan" diagnostic if the error is actually due to a
non-runnable test script.
* lib/tap-driver.pl (start): Removed, broken up into ...
(setup_io): ... this ...
(setup_parser): ... and this, which now tries to catch and report
errors in launching the test scripts.
(finish): New, used by both 'main' and 'setup_parser'.
(main): Adjust.

12 years agoMerge branch 'maint'
Peter Rosin [Wed, 1 Feb 2012 15:28:48 +0000 (16:28 +0100)]
Merge branch 'maint'

12 years agotests: put AM_PROG_CC_C_O before AC_OUTPUT to help losing compilers
Peter Rosin [Wed, 1 Feb 2012 14:47:45 +0000 (15:47 +0100)]
tests: put AM_PROG_CC_C_O before AC_OUTPUT to help losing compilers

When AM_PROG_CC_C_O is after AC_OUTPUT, the compile script
is not used even if needed, causing testsuite fails if
libtool is not used.

* tests/depcomp8a.test: Uncomment the AM_PROG_CC_C_O macro
in its correct location, as indicated...
(configure.in): ...with this comment.
* tests/depcomp8b.test: Sync with tests/depcomp8a.test.

12 years agocleanup: remove unused .am file
Stefano Lattarini [Tue, 31 Jan 2012 11:52:24 +0000 (12:52 +0100)]
cleanup: remove unused .am file

* lib/am/comp-vars.am: Remove.  This file has stopped being useful
since commit 'Release-1-4d-206-g3334f9a' of 09-04-2001, and should
have been removed back then.  But apparently only its contents were
removed, leaving the file empty but still present in the repository.
Or maybe this situation is  the consequence of a minor blunder in
the conversion from CVS to Git; either way, this is not a big deal.

12 years agoMerge branch 'maint'
Stefano Lattarini [Tue, 31 Jan 2012 07:31:59 +0000 (08:31 +0100)]
Merge branch 'maint'

* maint:
  tests: do not assume the object file extension is .o
  tests: avoid spurious failure of 'transform2.test' on Cygwin
  tests: avoid spurious failure of deleted-am.test with FreeBSD make
  tests: avoid possibly undeserved PASS from check8.test
  warnings: more precise category and message for one warning
  release: revamp rules to tag and upload the releases
  amversion: add missing dependency
  hacking: update advice w.r.t. synced files
  hacking: don't reference ChangeLog anymore

+ Extra non-trivial edits:

* tests/suffix8.tap: Copy in (by hand) the modifications done
to 'suffix8.test' on maint, i.e., the addition of an explicit
'.y_.obj:' suffix rule to Makefile.am.

12 years agoMerge branch 'msvc'
Peter Rosin [Mon, 30 Jan 2012 22:27:06 +0000 (23:27 +0100)]
Merge branch 'msvc'

* msvc:
  ar-lib: ignore the verbose modifier instead of erroring out
  scripts: cherry-pick recent changes from master
  tests: add missing dependency for some 'ar-lib*.test' tests

12 years agoar-lib: ignore the verbose modifier instead of erroring out
Peter Rosin [Mon, 30 Jan 2012 22:19:03 +0000 (23:19 +0100)]
ar-lib: ignore the verbose modifier instead of erroring out

* lib/ar-lib: A number of tests uses the v modifier when listing
the archive content, ignore it to make them pass.

12 years agoscripts: cherry-pick recent changes from master
Peter Rosin [Mon, 30 Jan 2012 22:16:37 +0000 (23:16 +0100)]
scripts: cherry-pick recent changes from master

* lib/ar-lib: prefer the term "Windows" over "Win32" and quote
'like this', not `like this'.
* lib/compile: Likewise.

12 years agomaintcheck: fix real and spurious warnings
Stefano Lattarini [Sat, 28 Jan 2012 12:23:16 +0000 (13:23 +0100)]
maintcheck: fix real and spurious warnings

* lib/Makefile.am (install-data-hook): Correctly quote $(DESTDIR)
occurrences.
* Makefile.am (install-exec-hook, uninstall-hook): Likewise.
(autodiffs): Prefer '$(am__cd)' to plain 'cd', where warranted.
* doc/Makefile.am ($(srcdir)/amhello-1.0.tar.gz): Likewise.  Also,
prefer using AC_SUBST'd $(abs_top_builddir) over obtaining it at
runtime from $(top_builddir).
* syntax-check.mk (sc_mkinstalldirs): Tweak to whitelist known
harmless occurrences of the checked-against usages.
(sc_no_for_variable_in_macro): Likewise.
* tests/CheckListOfTests.am (maintainer-check-list-of-tests): Tweak
to avoid spuriously triggering the 'sc_no_for_variable_in_macro'
maintainer check.  Prefer '$(am__cd)' to plain 'cd' when warranted.