Ensure that, for what concerns the options specified in
AUTOMAKE_OPTIONS, explicitly-defined warnings always take
precedence over implicit strictness-implied warnings.
This finally fixes Automake bug#7669 a.k.a. PR/547.
* automake.in (handle_options): Call 'process_option_list'
only once per set of options.
* lib/Automake/Options.pm (process_global_option_list,
process_option_list): Add sanity checks.
($_options_processed, $_global_options_processed): New
internal variables, used by the sanity checks above.
* tests/warnings-win-over-strictness.test: Extend.
Change signature of 'Automake::Options::_process_option_list()'.
This only modifies internal details in the automake implementation,
bearing no externally visible effect, but preparing the way for the
final fix of Automake bug#7669 a.k.a. PR/547.
* lib/Automake/Options.pm (_process_option_list): Now accepts as
arguments a list of hash references with keys 'option' and 'where',
where 'option' is an option as might occur in AUTOMAKE_OPTIONS or
M_INIT_AUTOMAKE, and 'where' is the location where that occurred.
(process_option_list, process_global_option_list): Update.
* automake.in (handle_options, scan_autoconf_traces): Update.
In view of soon-to-follow refactorings (still in the pursuit of a
fix for Automake bug#7669 a.k.a. PR/547), add some more tests on
AUTOMAKE_OPTIONS support, to prevent obvious regressions.
This change ensures that, for what concerns the options specified
in AM_INIT_AUTOMAKE, explicitly-defined warnings always take
precedence over implicit strictness-implied warnings. Related to
Automake bug#7669 a.k.a. PR/547.
* lib/Automake/Options.pm (_process_option_list): Parse explicit
warnings only after the strictness level has been set. Fix POD
documentation.
* tests/warnings-win-over-strictness.test: Extend.
This change ensures that, on the command line at least, explicitly
defined warnings always take precedence over implicit strictness
implied warnings. Related to Automake bug#7669 a.k.a. PR/547.
* automake.in (parse_arguments): Parse warnings only after the
strictness level has been processed.
* tests/gnuwarn.test: Update, plus miscellaneous improvements.
* tests/warnings-win-over-strictness.test: New test.
* tests/Makefile.am (TESTS): Update.
Add new tests on strictness and warnings precedence and overriding.
* tests/strictness-overriding.test: New test.
* tests/strictness-precedence.test: New test.
* tests/warnings-overriding.test: New test.
* tests/warnings-precedence.test: New test.
* tests/Makefile.am (TESTS): Update.
Ralf Wildenhues [Thu, 13 Jan 2011 19:21:39 +0000 (20:21 +0100)]
Avoid testsuite failures due to Autoconf Fortran change.
Autoconf v2.68-21-g727ce95 causes AC_F77_LIBRARY_LDFLAGS to
require computing the canonical host name. Ensure config.guess
and config.sub files are present for respective checks.
* tests/compile_f_c_cxx.test: Add stub files.
* tests/flibs.test: Likewise.
* tests/fort4.test: Use $AUTOMAKE -a for installing files.
* doc/automake.texi (Yacc and Lex): Document that automake
recognizes '-d' in AM_YFLAGS only if it's not clustered with
other options.
From a report by Юрий Пухальский.
tests: more consistent checks about invalid options
* tests/aclocal.test: Grepping of automake stderr for messages
reporting invalid options made stricter.
* tests/no-outdir-option.test: Likewise. Also, create a dummy
`Makefile.am', to ensure that the automake failures are really
caused only by unrecognized options.
* tests/automake.test: Added trailing `:' command. Removed
redundant checks on `--help' and `--version' option (already
performed in the test `help*.test').
* tests/defs: Enable `errexit' shell flag (near the end).
Removed redundant comment about the enabling of shell traces.
* tests/README (Writing test cases): Update, and use nicer
formatting in a couple of places.
* All tests: Adjusted by removing now-redundant calls to
'set -e'.
tests: work around a texi+cygnus bug causing a spurious XFAIL
* tests/txinfo5b.test: New test, like txinfo5.test but calling
automake with the `-Wno-override' option to work around a bug
in the texinfo + cygnus interaction.
* tests/txinfo5.test: Update heading comments.
* tests/Makefile.am (TEST): Updated.
Apparently I messed up doing a previous 'git pull', so that the "latest"
maint I've merged into master (and pushed!) wasn't a fast-forward from
origin/maint. Yay for me. This merge should help cleaning up the mess.
Merge branch 'maint' of ssh://git.sv.gnu.org/srv/git/automake into maint
Apparently I messed up doing a previous 'git pull', so that the "latest"
maint I've merged into master (and pushed!) wasn't a fast-forward from
origin/maint. Yay for me. This merge should help cleaning up the mess.
Improve, extend and tweak tests on Texinfo support.
* tests/instdir-texi.test: Add a call to `ls -l' after that to
`make', for debugging. When looking for required tools, do not
redirect the output of "$tool --help" to /dev/null, and do not
uselessly run it in a subshell.
* tests/txinfo.test: Rewritten to run autoconf, ./configure and
make. All checks moved into Makefile.am.
* tests/txinfo8.test: Likewise, and modernize the generated
configure.in.
* tests/txinfo2.test: Moved checks into Makefile.am, and other
minor improvements.
* tests/txinfo5.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command.
* tests/txinfo6.test: Likewise, and make grepping of generated
Makefile.in stricter.
* tests/txinfo7.test: Enable `errexit' shell flag, and related
changes. Add trailing `:' command. Do not add unnecessary stuff
to Makefile.am.
* tests/txinfo9.test: Verify that more targets which are expected
to be generated only once really are. Make grepping less strict,
to avoid exposing too much internal details. More minor changes.
* tests/txinfo16.test: Add trailing `:'. Prefer cat over echo
for appending to configure.in. Updated/fixed heading comments.
* tests/txinfo23.test: Likewise, and extended a little by making
it check that no info file is created in the $(srcdir).
* tests/txinfo24.test: Likewise.
* tests/txinfo25.test: Likewise.
* tests/txinfo18.test: Add trailing `:'. Prefer cat over echo
for appending to configure.in. Also, check that index files are
cleaned also by "make clean", not only by "make distclean".
* tests/txinfo22.test: Prefer `$me' over hard-coded test name,
and added trailing `:' command. This testcase also used to check
that automake ignores in-line comments when using variables, but
preserves them in the output; these checks (added in commit
"Release-1-7f-4-g9177ef8") do not really pertain to this test,
so they have been moved ...
* tests/comments-in-var-defn.test: ... into this new test.
* tests/txinfo4.test: Escape literal dots in grep regexps. Add
trailing `:' command.
* tests/txinfo29.test: Likewise. Relax grepping of generated
Makefile.in w.r.t. whitespaces. Prefer `cat' over `echo' to
append to configure.in.
* tests/txinfo3.test: Likewise.
* tests/vtexi.test: Improve grepping of Makefile.in (sometimes
make it stricter, sometimes laxer). Move `set -e' setting just
after the inclusion of ./defs. De-uglify a sed command. Other
minor cosmetic improvements.
* tests/vtexi2.test: Make grepping of Makefile.in stricter. Add
trailing `:' command.
* tests/vtexi3.test: New test on version.texi support.
* tests/vtexi4.test: Likewise.
* tests/Makefile.am (TESTS): Updated.
tests: fix spurious failure in 'tests/yflags-conditional.test'
* tests/yflags-conditional.test: Filter out message "warnings are
treated as errors" from automake stderr, to avoid a false positive
when grepping for extraneous warning messages.
yacc: warn about conditional content in *YFLAGS variables
This commit fixes automake bug#7804.
* automake.in (lang_yacc_target_hook): Warn if any of the relevant
*YFLAGS variables has conditional contents (not only a conditional
definition). Related refactoring.
* NEWS: Updated.
* tests/yflags-conditional.test: Updated and extended.
* tests/yflags-conditional-force.test: New test.
* tests/Makefile.am (TESTS): Updated.
yacc: support variable expansions in *YFLAGS definition.
This change fixes automake bug#7800.
* automake.in (lang_yacc_target_hook): Use 'value_as_list_recursive'
instead of 'variable_value' to get the value of *YFLAGS variables.
Related changes.
($DASH_D_PATTERN): Removed.
* tests/Makefile.am (XFAIL_TESTS): Remove yflags-var-expand.test.
* tests/yacc-clean.test: Remove workaround for now-fixed bug.
* NEWS: Update.
* tests/yflags-var-expand.test: New test, still xfailing. It
exposes automake bug#7800 -- "automake fails to honor `-d' in
AM_YFLAGS when variable expansions are involved".
* tests/yflags-d-false-positive.test: New test, checking that
automake do not spuriously see `-d' in *YFLAGS when that isn't
really there.
* tests/yflags-force-override.test: New test, checking that
automake can cope with definition of the YFLAGS variable in
Makefile.am (even if that is an extremely bad practice, as that
variable is user-reserved).
* tests/yflags-cmdline-override.test: New test, checking that
automake can cope with user-redefinition of YFLAGS at configure
time and/or at make time.
* tests/yflags-conditional.test: New test, checks that automake
warns on conditionally-defined *YFLAGS variables.
* tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
* tests/yacc-basic.test: Also check that the intermediate C file
is mentioned in the generated Makefile.in, and that it is created
by the first make invocation.
* tests/yacc3.test: Test removed, superseded by ...
* tests/yacc-d-basic.test: ... this new test.
* tests/yacc2.test: Add reference to that new test in the heading
comments.
* tests/yacc-d-vpath.test: New test.
* tests/yaccvpath.test: Updated heading comments. Do not require
gcc anymore, as any working C compiler should be enough. Remove
redundant comments.
* tests/yacc-nodist.test: New test.
* tests/yacc-dist-nobuild.test: New test.
* tests/Makefile.am (TESTS): Update.
Ralf Wildenhues [Sun, 9 Jan 2011 11:06:24 +0000 (12:06 +0100)]
Add test coverage for deleted header files.
* tests/depcomp6.test, tests/depcomp7.test: Update tests to
also check for the deleted header bug. If no dependency
tracking mechanism could be found, SKIP rather than exit
successfully. Use GNU style spacing and ANSI C prototypes.
yacc: "make clean" removes .c and .h files from non-distributed .y
Previously, while automake did *not* distribute C source and header
files derived from non-distributed Yacc sources, it still caused
them to be removed only by "make maintainer-clean" only, and not by
simply "make clean" or "make distclean".
This caused "make distcheck" to fail, unless the developer put
those generated .c and .h files in CLEANFILES or in DISTCLEANFILES
by hand.
This change fixes this issue, by making non-distributed `.c' and
`.h' files generated by non-distributed Yacc sources cleaned by
"make clean".
* tests/automake.in (lang_yacc_target_hook): Make C source and
header files derived from non-distributed Yacc files cleaned by
"make clean", not only by "make maintainer-clean".
* tests/yacc-clean.test: New test.
* tests/Makefile.am (TESTS): Update.
* NEWS: Update.
docs: how to work around checks on invalid primary/directory couples
* doc/automake.texi (Uniform): Document the blessed idiom which can
be used to work around automake checks on invalid primary/directory
couples (such as `lib_PROGRAMS' or `doc_LIBRARIES').
* tests/suffix.test: Check that suffix rules for C compilation are
only included once. Try also with a static library.
* tests/suffix2.test: Add a new grep to help potential debugging.
Do not run automake with the `--add-missing' options, since we
already create all the needed auxiliary files. Try also *without*
the `no-dependencies' automake option.
* tests/suffix4.test: Make grepping of Makefile.in stricter.
* tests/suffix3.test: Rewritten to run also autoconf, ./configure
and make.
* tests/suffix5.test: Likewise.
* tests/suffix6.test: Fix botched recipe indentation (eight spaces
were used instead of a tabulation character). Extend to check
that `.obj' is handled like `.$(OBJEXT)' (as is done for `.o').
Improved parsing & grepping of generated Makefile.in. Other minor
fixes and improvements.
* tests/suffix10.test: Move some checks in Makefile.am. Also run
"make all".
* tests/suffix12.test: Likewise, and account for VPATH issues in
weaker make implementations.
* tests/suffix11.test: Likewise. Also, run "make distcheck", for
completeness, and related changes.
* tests/suffix8.test: Likewise. Also, do not put `gcc' anymore
in $required.
* tests/suffix13.test: Do not use the `--force-missing' automake
option unnecessarily.
* tests/suffix6b.test: New test, semantic sister of `suffix6.test'.
* tests/suffix6c.test: Likewise.
* tests/Makefile.am (TESTS): Updated.
Work around a bug in file-inclusion mechanism of Solaris make.
* automake.in (handle_single_transform): In the name of the
dependency file: collapse multiple slash characters into a single
one.
* tests/subobj11a.test: New test.
* tests/subobj11b.test: Likewise.
* tests/subobj11c.test: Likewise.
* tests/depcomp8a.test: Likewise.
* tests/depcomp8b.test: Likewise.
* tests/Makefile.am (TESTS): Updated.
* NEWS: Updated.
Report by Stefano Lattarini, quick fix by Ralf Wildenhues, final
patch and tests by Stefano Lattarini.
This change deals with a Zsh incompatibility in the handling
of the special shell variable `$0' in sourced files; this
incompatibility used to cause utter breakage when the
Automake testsuite was run in parallel mode with Zsh as
the $(TEST_LOG_COMPILER).
For more information, please refer to the thread "Fix parallel
testsuite run with zsh" on automake-patches, dated 2010-12-22:
<http://lists.gnu.org/archive/html/automake-patches/2010-12/msg00135.html>
This change works around the problems described above for Zsh 4.3
or later, and offers better error messages (instead of random
failures) for earlier Zsh version.
* tests/README (Supported shells): When describing the manual
workaround about the Zsh incompatibility in the handling of `$0',
tell that it is now needed only with Zsh versions preceding 4.3.
Done also some minor rewordings.
* tests/defs-static.in ($argv0): New variable, offers a workaround
for the Zsh incompatibility in the handling of `$0'.
Abort if that variable cannot be correctly set (can happen only
in older Zsh version).
* tests/defs ($me): Define using `$argv0', not `$0'.
* tests/suffix13.test (Makefile.am): Account for VPATH issues on
weaker make implementations (e.g. IRIX 6.5).
* tests/parallel-tests8.test: Likewise, plus a required related
change.
Reported by Ralf Wildenhues. The bugs have been there from the
first versions of the affected test scripts.
* doc/automake.texi (Cygnus): Mode 'cygnus' does not require
the AM_CYGWIN32 macro (and indeed hasn't required it since at
least commit Release-1-2-31-g3038064 "merged changes from
Cygnus" of 1997-08-25).
* tests/distlinksbrk.test: Run "make" multiple times and grep
its output each time for a single error message, rather than
running "make -k" one single time and grepping its output for
all the expected error messages. This should work around make
implementations with limited (broken?) `-k' support; for more
information, see these subthreads on the automake-patches list:
- 2010-11-15, "Testsuite failures on HP-UX 11.23",
<http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00162.html>
- 2010-11-15, "Testsuite failures on IRIX 6.5",
<http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00166.html>
Fix spurious failures in tests on AC_CONFIG_AUX_DIR.
* tests/auxdir7.test: Do not try to needlessly overwrite the files
`install-sh' and `missing'. This avoid spurious failures in "make
distcheck", when those files might be copied as read-only from the
`lib' directory.
* tests/auxdir8.test: Likewise.
Make test 'posixsubst-script' portable to MinGW/MSYS.
* tests/posixsubst-script.test: Ensure that the generated dummy
scripts really start with a shebang line, to work around a
limitation of 'test -x' on MinGW/MSYS.
docs: fix blunder in example about python extension modules
* doc/automake.texi (Python): Use `quaternion_la_SOURCES',
not `quaternion_SOURCES', to declare the sources of python
extension module `quaternion.la'.
Extend, fix and improve tests on Lex and Yacc support.
* tests/lexcpp.test: New test script, on support for Lex + C++.
* tests/lexvpath.test: New test script, test build and rebuild
rules for lexers in VPATH setup.
* tests/yacc-basic.test: New test script, run simple "semantic"
checks on basic Yacc support (similarly to what lex3.test does
for Lex support).
* tests/lex.test: Don't create useless dummy source file joe.l.
Remove extra blank lines.
* tests/lex4.test: Add trailing `:' command. Do not create dummy
useless lex source file.
* tests/lex2.test: Likewise. Call automake with the `-a' option,
so that it doesn't fail for the absence of `ylwrap' script. Make
grepping of automake stderr stricter.
* tests/yacc7.test: Add trailing `:' command. Enable `errexit'
shell flag earlier (just after having sourced ./defs).
* tests/yacc4.test: Likewise. Also ...
(configure.in): Use pre-populated skeleton set up by ./defs,
instead of writing one from scratch.
Other minor cosmetic changes.
* tests/yacc5.test: Likewise.
* tests/yaccvpath.test: Likewise. Also ...
($distdir): New variable.
Use it throughout.
* tests/lex5.test: Likewise.
* tests/lex3.test: Likewise. Check the distdir, rather than
grepping the distribution tarball. Extend the test on the
created binary, and be sure to avoid hangs. Add some comments.
* tests/yacc.test: Use stricter grepping. Add trailing `:'.
* tests/yacc6.test: Likewise.
* tests/yacc3.test: Likewise. Do not create the unused file
`Makefile.sed'. Remove useless rules from Makefile.am. Other
minor cosmetic changes.
* tests/yacc2.test: Make grepping of generated `Makefile.in' and
of automake error messages stricter. Do not redirect output of
grep to /dev/null. Move call to aclocal earlier. Reduce the
number of empty blank lines. Fix a typo in comments.
* tests/yacc8.test: Fixed bugs that reduced the completeness of
the tests. Added trailing `:' command.
(configure.in): Use pre-populated skeleton set up by ./defs,
instead of writing one from scratch.
* tests/yaccpp.test: Test also extensions `.y++', `.ypp', and
`.yxx', rather than only `.yy'.
* tests/Makefile.am (TESTS): Update.
* m4/depend.m4 (AM_DEP_TRACK): Use `AS_HELP_STRING' to format
the help message added to the generated configure.
* m4/dmalloc.m4 (AM_WITH_DMALLOC): Likewise.
* m4/lispdir.m4 (AM_PATH_LISPDIR): Likewise.
* m4/maintainer.m4 (AM_MAINTAINER_MODE): Likewise.
* m4/multi.m4 (AM_ENABLE_MULTILIB): Likewise.
Also, bumped all serial numbers of the modified m4 files.