Enable `set -e' in more tests (plus some tweakings).
* tests/mkinstall.test: Enable `errexit' shell flag, and related
changes. Add a trailing `:' command, if needed.
* tests/mdate2.test: Likewise.
* tests/objc.test: Likewise.
* tests/noinst.test: Likewise.
* tests/outdir.test: Likewise.
* tests/number.test: Likewise.
* tests/pluseq.test: Likewise.
* tests/req.test: Likewise.
* tests/rulepat.test: Likewise.
* tests/specflg6.test: Likewise.
* tests/spell3.test: Likewise.
* tests/parse.test: Likewise, and ...
(configure.in): Use the stub created by ./defs, rather than
writing it from scratch. Remove useless calls to AC_PROG_RANLIB
and AC_OUTPUT.
* tests/mdate4.test: Likewise.
* tests/mkinstall.test: Likewise, and ...
(configure.in): ... drop useless call to `AC_OUTPUT'.
* tests/output.test: Enable `errexit' shell flag, and related
changes. Add a trailing `:' command.
(configure.in): Modernize.
* tests/output2.test: Likewise.
* tests/output3.test: Likewise.
* tests/output4.test: Likewise.
* tests/mdate3.test: Enable `errexit' shell flag, and related
changes. Prefer `$me' over hard-coded test name.
* tests/nodistdir.test: Enable `errexit' shell flag, and related
changes. Prefer trailing `:' over trailing `Exit 0'.
* tests/nodist.test: Likewise. Also, prefer cat + here-doc over
echo to create input test files, and do not create useless dummy
C source files.
* tests/nodist2.test: Likewise.
* tests/ppf77.test: Enable `errexit' shell flag, with related
changes. Add a trailing `:' command. Do not create useless
dummy source files.
* tests/spelling.test: Enable `errexit' shell flag, with related
changes. Add a trailing `:' command. Also, grep Automake error
message.
* tests/specflg3.test: Enable `errexit' shell flag, with related
changes. Avoid unportable use of `-e' option of fgrep. Prefer
trailing `:' over trailing `Exit 0'. Remove extra empty lines,
and cosmetic changes to whitespaces.
* tests/obsolete.test: Enable `errexit' shell flag, with related
changes. Improve verbosity. Other miscellanous changes.
Improve and extend tests on `:=' variable assignments.
* tests/colneq.test: Avoid redundant use of variable assignments
in Makefile.am. Use command-line automake options instead of
editing AUTOMAKE_OPTIONS in Makefile.am. Make grepping of the
generated Makefile.in slightly stricter. Add a trailing `:'
command.
* tests/colneq2.test: Do not create unneeded dummy files. Run
also autoconf, ./configure and make. Add trailing `:' command.
* tests/colneq3.test: New test, similar to colneq.test, but
running also autoconf, ./configure and make.
* tests/Makefile.am (TESTS): Update.
* automake.in (parse_arguments): Do not recognize anymore options
`--Werror' and `--Wno-error' as synonyms of respectively `-Werror'
and `-Wno-error'.
* tests/werror.test: Update: use `-Werror' instead of `--Werror'.
* NEWS: Update.
In some tests on automake-produced silent rules, we forced the
use of gcc depmode to improve testsuite coverage; but this has
unsurprisingly led to spurious failures when some non-GNU C
compilers were used. So we are now careful to require GCC in
tests that force gcc depmode.
From reports by Ralf Wildenhues.
* silent5.test: Test removed, its content split into ...
* silent-many-generic.test, silent-many-gcc.test: ... these new
sister tests, the latter of which forces gcc depmode and lists
"gcc" in $required.
* silentlex.test: Test removed, its content split into ...
* silent-lex-generic.test, silent-lex-gcc.test: ... these new
sister tests, the latter of which forces gcc depmode and lists
"gcc" in $required.
* silentyacc.test: Test removed, its content split into ...
* silent-yacc-generic.test, silent-yacc-gcc.test: ... these new
sister tests, the latter of which forces gcc depmode and lists
"gcc" in $required.
* tests/Makefile.am (TESTS): Updated.
Modernize, improve and/or tweak some test scripts.
* tests/maintclean.test: Use proper m4 quoting. Add trailing `:'
command.
* tests/sinclude.test: Likewise, and add a couple of blank lines,
for clarity.
* tests/make.test: Move setting of `errexit' shell flag earlier in
the script (just after inclusion of ./defs). Use the configure.in
stub created by ./defs, rather than writing it from scratch. Some
cosmetic changes in spacing. Ensure we wait enough time before
touching configure.in to trigger the rebuild rules.
* tests/makej.test: Use `$me' instead of hard-coding the test
name. Add trailing `:' command.
* tests/version7.test: Likewise.
* tests/space.test: Enable `errexit' shell flag, and related
changes.
* tests/makevars.test: Likewise. Also, prefer trailing `:' over
trailing `Exit 0', and be more tolerant of white spaces when
grepping Makefile.in.
Code cleanup after removal of option `--output-directory'.
* automake.in ($output_directory): Remove, it's unconditionally
defined to `.' and used only ...
(generate_makefile): ... in this subroutine, which now has been
edited and simplified accordingly.
* Makefile.am (release-stats): Be sure to take into account all
the generated tests, by grepping the test scripts to decide which
ones of them are automatically generated.
* tests/repeated-options.test: New test, check that automake
does not complain on repeated options, nor generate broken or
incorrect makefiles.
* tests/Makefile.am (TESTS): Updated.
Fix spurious failures of silent5.test with Sun Fortran.
* tests/silent5.test: Strip from the make output some verbose
messages possibly printed by the SunStudio fortran compilers,
to avoid spurious failures. This bug has been there from the
very first version of this test script.
Fix spurious failures of silent-rules tests with Sun Fortran.
* tests/silentf77.test: Strip from the make output some verbose
messages possibly printed by the SunStudio fortran compilers, to
avoid spurious failures. Add a trailing `:' command.
* tests/silentf90.test: Likewise.
Fix regression in colon{5,6}.test (failures on AIX 5.3).
* tests/colon5.test: Also substitute `@SHELL@' with `$SHELL' when
post-processing the generated Makefile.in, to work around a bug
of AIX 5.3 make which doesn't allow setting the `$(SHELL)' macro
on the commend line. Calls to `$MAKE' adjusted accordingly.
* tests/colon6.test: Likewise.
Regression introduced in commit v1.11-175-gf9fe878 "Modernize,
improve and/or extend tests `colon*.test", and reported by Ralf
Wildenhues.
* tests/backcompat5.test: Remove double-hash comments
from makefile rule commands, they are not part of the
Automake API. Fixes testsuite failure with Tru64 make.
* tests/ansi.test: Remove redundant hackish check done using a
hand-postprocessed Makefile.in. This checs worked by setting
the `$(SHELL)' macro on the command line of make, but this is
not supported by the AIX 5.3 make implementation.
This bug has been lurking for a long time, and was activated by
commit v1.11-125-gc1f6cdb "Enable `errexit' shell flag in various
tests". Report by Ralf Wildenhues.
Ralf Wildenhues [Sun, 14 Nov 2010 16:53:49 +0000 (17:53 +0100)]
Fix install-strip when $(STRIP) contains several words.
* lib/am/install.am (install-strip): Update comment. Use
separate sub-make invocations for empty and nonempty $(STRIP),
to fix quoting issues.
* tests/strip2.test, tests/strip3.test: New tests.
* tests/Makefile.am (TESTS): Adjust.
Fix bug in test `backcompat6.test' (MSYS portability).
* tests/backcompat6.test (Makefile.am): Grep the output from the
test program, rather than diffing it, to avoid spurious failures
on MinGW/MSYS due to LF vs. CRLF line endings.
* m4/regex.m4: Document the `AM_WITH_REGEX' macro as obsolete,
and state that it should be removed two years from now.
(AM_WITH_REGEX): Raise an m4-time warning of the "obsolete"
category when this macro is used.
* doc/automake.texi (Public Macros): Move description of
`AM_WITH_REGEX' from here ...
(Obsolete Macros): ... to here, and declare it as obsolete
and "to be removed in a future version".
* tests/regex-obsolete.test: New test.
* tests/Makefile.am (TESTS): Update.
* tests/defs: Give meaningful messages about the reasons of a
test skip; this is especially useful as this file is run without
verbose xtraces on. Related reorderings in the code and new
comments.
Enable `set -e' in more tests (plus some tweakings).
* tests/implicit.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command.
* tests/insh2.test: Likewise.
* tests/instman2.test: Likewise.
* tests/interp.test: Likewise.
* tests/interp2.test: Likewise.
* tests/library.test: Likewise.
* tests/mclean.test: Likewise.
* tests/info.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command. Remove useless chaff from
generated Makefile.am. Add a "FIXME" comment.
* tests/include.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command. Prefer cat + here-doc over
echo to append to configure.in. Make tests more robust by using
longer and less common names to grep. Remove an useless call to
echo. Remove an useless subshell.
* tests/header.test: Enable `errexit' shell flag, and related
changes. Use proper m4 quoting. Add excerpts from the original
report of the bug tested for by this script.
* tests/gcj.test: Enable `errexit' shell flag, and related
changes. Use proper m4 quoting. Add trailing `:' command.
* tests/gcj3.test: Likewise.
* tests/ldflags.test: Likewise.
* tests/libtool.test: Likewise.
* tests/listval.test: Likewise.
* tests/javaprim.test: Likewise, and prefer cat + here-doc over
echo to append to configure.in.
* tests/javasubst.test: Likewise.
* tests/discorver.test: Enable `errexit' shell flag. Prefer
trailing `:' over trailing `Exit 0'.
* tests/instdat.test: Enable `errexit' shell flag, and related
changes. Use proper m4 quoting. Avoid usless subshell. Prefer
cat + here-doc over echo to append to configure.in.
* tests/libtool2.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command. Use the configure.in
stub provided by ./defs, rather than writing it from scratch.
Tests defs: move static definitions in a new file `defs-static'.
The new file is meant to be idempotent w.r.t. mutiple inclusions.
* tests/defs.in: Removed, its contents split among ...
* tests/defs-static.in: ... this new file ...
* tests/defs: ... and this new file, including the former.
* configure.ac (AC_CONFIG_FILES): Remove `tests/defs', add
`tests/defs-static'.
(AC_CONFIG_LINKS): Add `tests/defs'.
* tests/Makefile.am ($(parallel_tests)): Update.
($(instspc_tests)): Likewise.
* tests/.gitignore: Update.
* tests/defs.in ($testsbuilddir): Substitute from @abs_builddir@.
Add sanity check on $testsbuilddir, similar to those on
$testsrcdir and $top_testsrcdir.
Tests defs: do not print message "Running test $0" anymore.
* tests/defs.in: Printing the message "=== Running test $0" at
the beginning of each tests made sense when Automake used the old
test-driver, which sent all the output directly to stdout/stderr.
Now that the parallel test-driver is used, which saves output of
each test in its correspoding log file, that old message is just
useless noise.
* tests/defs.in: We already save the value of `pwd` in $curdir
early in the file, so there no need to recalculate it later, when
the current working directory is not changed.
Tests defs: do not use `Exit' where plain `exit' suffices.
* tests/defs.in: Use "exit 77" rather than "Exit 77" to skip the
test when required libtool/gettext macros are not found, since
such skips would take place before the exit trap is installed.
Fix bug in test `backcompat4.test' (stale autom4te cache).
* tests/backcompat4.test: Remove stale autom4te cache directory
before re-running aclocal and automake. Also, since we are at
it, be more verbose in displaying contents of generated files,
to ease debuggability.
Reported by Ralf Wildenhues.
Minor improvements and extensions to various tests.
* tests/defun.test: Also run autoconf and grep the generated
configure to make sure that aclocal truly picks up all the
required macros.
* tests/compile_f_c_cxx.test: Prefer trailing `:' over trailing
`Exit 0'. Do not create useless dummy source files. Do not set
useless `$(foo_LDADD)' variable in `Makefile.am'. Do not call
useless macro `AC_F77_LIBRARY_LDFLAGS' in `configure.in'.
* tests/compile_f90_c_cxx.test: Likewise.
* tests/suffix10.test: Slighty stricter grepping of make output.
* tests/compile.test: Add trailing `:' command.
* tests/defun2.test: Likewise.
* tests/vars3.test: Likewise.
* tests/vartar.test: Likewise.
* tests/vars.test: Likewise. Also, extend test by checking
that the definition of `MY_FLAGS*' variables is preserved in
the generated `Makefile.in'.
* tests/stamph2.test: Prefer trailing `:' over trailing `Exit 0'.
Use proper m4 quoting in `configure.in'.
* tests/man.test: Enable `errexit' shell flag, and related changes.
Make grepping of generated Makefile.in slighty stricter.
* tests/man3.test: Add trailing `:' command.
* tests/man5.test: Prefer cat + here-doc over echo to append to
configure.in.
* tests/man2.test: Likewise, and add trailing `:' command.
* tests/man4.test: More thorough and consistent checking of make
error messages. Place fake `help2man' program in a new `bin'
directory rather than in `.'. Move the checks using the real
`help2man' program to ...
* tests/man6.test: ... this new test, and extend them. This test
passes with GNU make and Solaris make, still fails with BSD make.
* tests/man7.test: New test, extracted from old man4.test, which
checks for a bug in maintainer-clean w.r.t. generated manpages.
* tests/man8.test: New test, extracted from old man4.test, which
checks for a bug in distcheck w.r.t. generated manpages. Passes
with GNU make and Solaris make, still fails with BSD make.
* lib/Automake/VarDef.pm (append): Remove extra backslash-escaped
newlines from the end of the variable's content, before appending
to it.
* tests/pluseq11.test: New test, exposing the bug.
* tests/Makefile.am (TESTS): Update.
Modernize, improve and/or tweak various test scripts.
* tests/stamph2.test: Improve m4 quoting in `configure.in', and
prefer trailing `:' over trailing `Exit 0'.
* tests/syntax.test: Escape literal dots in grep regexps.
* tests/copy.test: Enable `errexit' shell flag. Extend test by
checking with `test' utility that the script `install-sh' is
copied, but not symlinked.
* tests/depdist.test: Move setting of `errexit' shell flag earlier
in the script (just after inclusion of ./defs). Avoid obsoleted
constructs in generated `configure.in'. Prefer to do our checks
by running configure and make over grepping Makefile.in.
* tests/target-cflags: Move setting of `errexit' shell flag
earlier in the script (just after inclusion of ./defs). Use the
`configure.in' stub created by `./defs', rather than writing it
from scratch.
* tests/target-clash: Do not uselessly run autoconf.
* tests/ctarget1.test: Renamed ...
* tests/cond-basic.test: ... to this. Use the `configure.in' stub
created by `./defs', rather than writing it from scratch.
Move setting of `errexit' shell flag earlier in the script (just
after inclusion of ./defs). Other minor cosmetic changes.
* tests/Makefile.am (TESTS): Updated.
New tests on obsoleted usages of automake/autoconf macros.
* tests/backcompat.test: New test script.
* tests/backcompat2.test: Likewise.
* tests/backcompat3.test: Likewise.
* tests/backcompat4.test: Likewise.
* tests/backcompat5.test: Likewise.
* tests/backcompat6.test: Likewise.
* tests/init.test: Extended and improved, esp. by trying more
combinations of calls to AC_INIT and AM_INIT_AUTOMAKE with few
arguments.
* tests/Makefile.am (TESTS): Updated.
Fix bug in rules for creating vala vapi/header files.
* automake.in (lang_vala_finish_target): Add forgotten "fi" in an
if control structure in a generated make rules. Bug introduced
by previous commit `v1.11-221-gd7c1679', and revealed by failure
of test `vala2.test'.
Fix potential bug in generated tests `instpc-*.test'.
This bug is due to the changes introduced by the recently-merged
"tests-init" branch. In that branch, `tests/defs' didn't define
anymore `$srcdir', instead defininig directly `$testsrcdir'; but
the generated tests were using `$srcdir', hence the bug.
Luckily, since the Automake parallel test driver automatically
exports `srcdir' to a proper value, that prevented the bug from
manifesting itself.
* tests/Makefile.am ($(instspc_tests)): In the generated test
scripts, use `$testsrcdir', not `$srcdir'.
Ralf Wildenhues [Sun, 3 Oct 2010 10:29:40 +0000 (12:29 +0200)]
Fix and document rules to not touch the tree with `make -n'.
* doc/automake.texi (Multiple Outputs): Document the problem of
modifications during dry-run execution, propose solution.
* NEWS: Update.
* automake.in (lang_vala_finish_target): Split recipe so the
stamp file is not removed with GNU `make -n'.
(lang_yacc_target_hook): Separate removal of parser output file
and header remaking.
* lib/am/lisp.am ($(am__ELCFILES)): Determine whether -n was
passed to make, take care not to remove any files in that case.
* lib/am/remake-hdr.am (%CONFIG_H%): Separate removal of
%STAMP% file from induced remaking of config header.
* tests/autohdrdry.test, tests/lispdry.test, tests/yaccdry.test:
New tests.
* tests/Makefile.am (TESTS): Update.
Overhauled and modularized tests in `instspc.test'.
The test `instspc.test' was way too big and fragile. Its running
time was very long. It also produced a log that was nearly
unreadable due to its length, making it very difficult to find
out the reason for failures.
Also, it was too much monolithic, with a single (maybe spurious)
failure in a corner case causing the whole test to fail (even if
everything worked as expected in the other 99% of cases).
The present change should solve these problems, by separating
`instspc.test' into many smaller, self-contained, auto-generated
tests.
* tests/instspc.test: Removed.
* tests/instspc-tests.sh: New script, fullfilling a double role:
1. it generates a Makefile.am snippet `tests/instspc-tests.am',
containing the definition of a list of new tests which will take
over the older `instspc.test', and
2. it is sourced by said generated tests with proper parameters
pre-set, to run the "meat" of the checks.
This apparent abuse is indeed required because the test generation
code and test execution code are inevitably interwined.
* tests/Makefile.am ($(srcdir)/instspc-tests.am): Include this
snippet, which (among the other things) defines ...
(instspc_tests): ... this new macro, containing the list of the
newly generated `instspc*.test' tests, and ...
(instspc_xfail_tests): ... this new macro, containing the list
of the `instspc*.test' tests expected to fail.
($(instspc_tests)): New rule, generates the `instspc*.test' tests.
($(instspc_tests:.test=.log)): New rule, registers the dependency
of all `instspc*.test' tests on the `instspc-tests.sh' script.
(TESTS): Add `$(instspc_tests)', remove `instspc.test'.
(XFAIL_TESTS): Add `$(xfail_instspc_tests)'.
(EXTRA_DIST): Distribute instspc-tests.sh.
(MAINTAINERCLEANFILES): Added $(instspc_tests).
Other minor cosmetic changes.
* bootstrap: Generate instspc-tests.am.
* tests/.gitignore: Updated.
Peter Rosin [Thu, 7 Oct 2010 20:27:53 +0000 (22:27 +0200)]
depcomp: add new one-pass depmode for MSVC 7 and later.
* lib/depcomp: Add new depmodes 'msvc7' and 'msvc7msys' which
make use of the -showIncludes option added in MSVC 7.
* m4/depend.m4 (_AM_DEPENDENCIES): Handle the new depmodes
similarly to 'msvisualcpp' and 'msvcmsys' as MSVC does not
support the -o option.
* lib/am/distdir.am (dist-xz): Do not hard-code xz's -9: that
made it impossible to override. Instead, use its XZ_OPT envvar,
defaulting to -9 if not defined. Thus no change in behavior
when XZ_OPT is not set, and now, this rule honors the setting
of that envvar when it is set. Suggested by Lasse Collin.
(dist-bzip2): Likewise for it's corresponding envvar: BZIP2.
* NEWS (Miscellaneous changes): Mention it.
* doc/automake.texi (The Types of Distributions): Describe the
newly enabled environment variables.