[ng] check: warn about dot-less $(TEST_EXTENSIONS) at make runtime
* lib/am/parallel-tests.am: Analyze the $(TEST_EXTENSIONS) contents at
make runtime, instead of relying on the '%INVALID_TEST_EXTENSIONS%'
transform once passed in by automake. Do any necessary error reporting
with the help of ...
(am__maybe_invalid_test_extensions): ... this new function.
* automake.in (is_valid_test_extension): Delete.
(handle_tests): Don't call that anymore. Simplify accordingly. Rely
on code in parallel-tests.am to report the proper errors at runtime.
* t/test-extensions.sh: Moved ...
* t/test-extensions-invalid.sh: ... to this, nd updated.
* Makefile.am (XFAIL_TESTS): Drop 'test-extensions.sh'.
[ng] check: be laxer in accepted $(TEST_EXTENSIONS)
Relax our checks on the contents of $(TEST_EXTENSIONS) by simply
verifying that every entry there starts with a dot.
The only reasons the restriction on the $(TEST_EXTENSIONS) was in
place was to ensure the relevant LOG_COMPILER, LOG_DRIVER, etc.,
variables derived from an extension had valid names according to
POSIX; but this is overkill for GNU make, since for it variables
names can happily contain "funny" characters as well (e.g., '!',
'@', '-', ...).
Maybe in the future we could start to again complain about truly
problematic characters (like '$', '=' or ','), but let's not
over-engineer for the moment. After all, mainline Automake had
suffered from a similar limitation in the long-lived version 1.11
(until commit v1.11-476-g90bea64 of 2011-10-01, "parallel-tests:
automake error our on invalid TEST_EXTENSIONS"), and nobody had
ever complained.
* automake.in (is_valid_test_extension): Be much laxer: accept
all the strings beginning with a dot, in addition to the @EXEEXT@
substitution.
* t/test-extensions-funny-chars.sh: New test.
[ng] check: logic to define *LOG_DRIVER vars moved to generated Makefiles
If a LOG_DRIVER variable is undefined, we should define a default for it,
pointing to the "simple" test driver ('lib/test-driver' in the automake
repository). Move the logic to do so out of the automake script and into
the generated Makefiles.
* automake.in (handle_per_suffix_test): Remove.
(handle_tests): Don't call it anymore, and simplify accordingly.
* lib/am/parallel-tests.am (am__handle_per_suffix_test): Define the
relevant LOG_DRIVER variable to a proper default if it is undefined.
* t/test-driver-cond.sh: Remove obsolete grepping checks.
[ng] warns: don't report possible issues with '_DEPENDENCIES' variables
This will allow us to move (in future changes) some more processing at
make runtime, without having automake complain spuriously (which couldn't
be avoided, as to avoid such complaints automake should have access to
context and information only available at make runtime -- which is clearly
impossible).
* NG-NEWS: Document that Automake-NG can be weaker than mainline Automake
in diagnostic and early error detection; and also explain why it is so.
* automake.in (check_typos): Don't check for possible typos in the
'_DEPENDENCIES'.
Consequently, don't bother calling 'set_seen' ...
(handle_per_suffix_test): ... on the 'LOG_DEPENDENCIES' variables ...
(scan_aclocal_m4): ... nor on the 'CONFIG_STATUS_DEPENDENCIES' and
'CONFIGURE_DEPENDENCIES' variables ...
(handle_tags): ... nor on the 'TAGS_DEPENDENCIES' variable ...
(handle_ltlibraries): ... nor on the 'libfoo_la_DEPENDENCIES' nor
the 'EXTRA_libfoo_la_DEPENDENCIES' variables ...
(handle_libraries): ... nor on the 'libfoo_a_DEPENDENCIES' nor the
'EXTRA_libfoo_a_DEPENDENCIES' variables ...
(handle_programs): ... nor on the 'program_DEPENDENCIES' nor the
'EXTRA_program_DEPENDENCIES' variables.
* t/vartypos.sh, t/vartypo2.sh: Relax accordingly.
This is just a preparatory commit in view of future changes.
* lib/am/header-vars.am (am__handle_exeext): New internal variable,
defined to "yes" if the automake static conditional '?HANDLE-EXEEXT?'
is true, and to "no" otherwise.
This new behaviour is suboptimal, but will allow us to move yet more
logic and processing from the automake scripts into the generated
Makefiles.
* automake.in (handle_tests): Distribute 'test-driver' unconditionally
if the variable TESTS is defined and the 'serial-tests' option is not
used.
(handle_per_suffix_test): Don't distribute 'test-driver' anymore.
* Several tests: Adjust.
* t/test-driver-custom-no-extra-driver.sh: Remove as obsolete.
[ng] check: warn about invalid TEST_EXTENSIONS at make runtime
* automake.in (handle_tests): Instead of warning about invalid test
extensions at Automake runtime, pass their list through the transform
'%INVALID_TEST_EXTENSIONS%' to ...
* lib/am/parallel-tests.am: ... this file, that will warn at make
runtime if that list is not empty.
[ng] check: move definition of console colors in its own '.am' fragment
This is only meant to simplify future changes. No semantic change is
intended.
* lib/am/check.am: Include ...
* lib/am/check.am (am__tty_colors, am__tty_colors_dummy): Move out to ...
* lib/am/color-tests.am: ... this new file.
* Makefile.am (dist_am_DATA): Adjust.
[ng] tests: get rid of an almost-obsolete test case (parallel-tests related)
* t/posixsubst-tests.sh: Remove this test, merging the still-relevant
parts of it ...
* t/parallel-tests-dynamic.sh: ... in here. Since we are at it, make
existing grepping checks on "make check" output slightly stricter.
Prefer make-time and recipe-time processing instead. Note that this
change does not (nor is meant to) offer any simplification nor performance
enhancement (in fact, it actually complicates the code); its purpose is
to continue the trend of "move logic and knowledge out of the automake
script and into the generated Makefiles".
* NG-NEWS: Report that $(TESTS) and $(XFAIL_TESTS) are not rewritten
anymore for $(EXEEXT) appending.
* automake.in (handle_tests): Don't rewrite TESTS nor XFAIL_TESTS
anymore.
* lib/am/check.am: If 'EXEEXT' AC_SUBST is used, process $(TESTS) and
$(XFAIL_TESTS) for $(EXEEXT) appending (for entries that are also
compiled programs). Do so with the help of ...
(am__check_cook_with_exeext_1, am__check_cook_with_exeext): ... this
new internal make functions, and place the processed content into
(am__cooked_tests, am__cooked_xfail_tests): ... these new internal
variables respectively.
(check-TESTS): Depend on and use $(am__cooked_tests) rather than
plain $(TESTS). While we are at it, remove some code duplication
with the help of the new 'is_xfail_test' shell function.
* t/check5.sh: Adjust and extend.
* t/check7.sh: Likewise.
* t/serial-tests.sh: Adjust.
* t/exeext4.sh: Adjust.
[ng] am: new private make variable $(am__all_progs)
This is just a preparatory refactoring for future changes.
* automake.in (generate_makefile): Substitute $(am__all_progs) to the
list of all programs "seen" by automake (by looking at the PROGRAMS
primary).
* t/all-progs.sh: New test.
[ng] automake: allow user to pass Makefile content (mostly) unprocessed
All the lines starting with a '!' character are now passed unprocessed
(apart from the stripping of that leading character) into the generated
Makefile.in, and placed between the variables' definitions and the
Makefile targets and recipes. This will provide the users wanting to
use more advanced GNU make features (like the 'ifeq' or 'define'
builtins) with a mean to do so, without automake pre-processing getting
in the way. More importantly, this will provide us with a way to do
so in out internal .am fragments ;-)
This is basically just a quick hack to allow us to implement some further
refactorings, and to move yet more logic and processing from the Automake
script to the generated Makefiles. Still, it's an unobtrusive and easy
to implement hack, so there will be no problem in ripping it out if it
turns out to be a bad idea.
* automake.in ($output_verbatim): New global variable.
(initialize_per_input): Reset it.
(read_am_file, file_contents_internal): When a line starting with "!" is
read, append its content to the '$output_verbatim', and do no further
processing on it.
* t/verbatim.sh: New test.
* lib/am/header-vars.am (am__lastword): Delete: now that we assume GNU
make 3.80 we can simply use the '$(lastword)' builtin (which is also
faster, for long lists). This also get us rid of an erroneously
truncated comment.
autodist: remove obscure, very seldom used, or obsolescent files
This removes obscure and undocumented crufty behaviour.
* NG-NEWS: Update.
* automake.in (@common_file): Don't automatically distribute the
'BACKLOG' nor 'libversion.in' files anymore. Also, don't list the
contents of @libtool_sometimes; in fact ...
(@libtool_sometimes): ... remove this altogether: the 'ltconfig.in'
file has been gone since at least version 1.3d (2001-04-02), according
to Libtool's NEWS file (more precisely, it has been removed in commit e927e431 of 2000-09-06, "libtool.m4 now contains a version of the code
that used to run from ltconfig, so that ltmain.sh and then libtool are
generated at configure time"); and the files ltcf-c.sh, ltcf-cxx.sh and
ltcf-gcj.sh has only been present in the 'multi-language-branch' branch
of the libtool repository (abandoned since 2001, see commit d7f080d6),
and they have never been truly merged into master nor any supported
libtool release.
Merge branches 'ng/require-gmake-3.81' and 'ng/decruft' into ng/master
* ng/require-gmake-3.81:
[ng] requirements: require GNU make >= 3.81
* ng/decruft:
[ng] cleanup: don't support $(ACLOCAL_M4_SOURCES) anymore, it's obsolete
[ng] compile: don't support $(INCLUDES) anymore, it's obsolete
[ng] mkinstalldirs: remove support for the script and the variable
[ng] cleanup: minor cleanups in remake-hdr.am
[ng] config.h.{bot,top}: don't support anymore (distribution and deps)
[ng] acconfig.h: don't support anymore (distribution and dependencies)
[ng] cleanup: remove obsolete special-handling of default source for libs
[ng] cleanup: remove a workaround for BSD make (default sources and VPATH)
[ng] cleanup: remove a workaround for BSD make (comments continuation)
[ng] cleanup: remove obsolescent comments about subdir-objects and deptrack
[ng] cleanup: remove a workaround only needed by Solaris make
[ng] push_dist_common: don't directly append to an Automake::Variable
Our implementation of make variables memoization doesn't work GNU make
3.80. Since GNU make 3.81 has been released by more than six years now,
we require it as the minimal supported version, to avoid wasting efforts
on older versions used only by a vanishingly small percentage of the user
base.
[ng] cleanup: don't support $(ACLOCAL_M4_SOURCES) anymore, it's obsolete
The $(ACLOCAL_M4_SOURCES) variables has been since long obsolete and
basically unused (since at least commit ab57cf28 of 2003-04-24), so
drop any mention of it.
* automake.in (scan_aclocal_m4): Don't bother warning about usages of
$(ACLOCAL_M4_SOURCES). Don't append it to @ac_deps. This makes such
variable always empty, so there's no need to return it. Adjust the
signature of this function accordingly, and ...
(handle_configure): ... update this function accordingly.
[ng] compile: don't support $(INCLUDES) anymore, it's obsolete
The $(INCLUDES) variables has been since long supplanted and obsoleted
by the $(AM_CPPFLAGS) variable (in documentation since the commit 3d248ab5 of 2001-06-12, "* automake.texi (Program variables): Document
AM_CPPFLAGS. Deprecate INCLUDES", and in code since the commit '1415d22f'
of 2002-07-09, "* automake.in (generate_makefile): Suggest using
AM_CPPFLAGS instead of INCLUDES".
So we can drop support for $(INCLUDES).
* NG-NEWS, doc/automake-ng.texi: Update.
* automake.in: Drop usages of $(INCLUDES) from several calls to
'register_language'.
(generate_makefile): Don't explicitly warn about the definition of
the $(INCLUDES) variable anymore.
* t/pluseq5.sh: Adjusted to avoid using the INCLUDES variable.
* t/werror2.sh: Likewise.
* t/warnopts.sh: Likewise, and remove extra-verbose comment.
[ng] mkinstalldirs: remove support for the script and the variable
According to our documentation:
mkinstalldirs used to be a wrapper around 'mkdir -p', which is not
portable. Now we prefer to use 'install-sh -d' when configure
finds that 'mkdir -p' does not work, this makes one less script to
distribute. For backward compatibility mkinstalldirs is still used
and distributed when automake finds it in a package. But it is no
longer installed automatically, and it should be safe to remove it.
So we remove the 'mkinstalldirs' as well as its companion $(mkinstalldirs)
variable from Automake-NG altogether.
* NG-NEWS, doc/automake-ng.texi: Update.
* automake.in (handle_configure): Don not require nor distribute the
'mkinstalldirs' script anymore. Do not define the $(mkinstalldirs)
variable.
(@common_files): Do not report 'mkinstalldirs' anymore. Reformat the
array while we are at it, to make it easier to add or remove entries
in the future.
* lib/mkinstalldirs: Delete this file.
* Makefile.am (dist_script_DATA): Remove it.
(check-coverage-run, recheck-coverage-run): Use $(MKDIR_P), not
$(mkinstalldirs), to create the 'cover_db' directory.
* syntax-checks.mk (sc_mkinstalldirs): Adjust to verify we have mo more
instances of 'mkinstalldirs'.
* contrib/multilib/config-ml.in: Remove comment referencing the
'mkinstalldirs' script.
* t/auxdir.sh: Adjust to use 'py-compile' rather than 'mkinstalldirs'.
* t/auxdir6.sh: Likewise.
* t/auxdir7.sh: Likewise.
* t/auxdir8.sh: Likewise.
* t/pr9.sh: Adjust comments to avoid spuriously triggering the
'sc_mkinstalldirs' maintainer check.
* t/mkinst3.sh: Converted to test 'install-sh -d' rather than
'mkinstalldirs'.
* t/subdir.sh: Adjust comments.
* t/werror.sh: Use 'am_create_testdir=empty' rather than removing
the install-sh, depcomp, missing and mkinstalldirs scripts by hand.
* t/mkinstall.sh: Remove as obsolete.
* t/instman2.sh: Likewise.
* lib/am/remake-hdr.am: Remove an obsolete comment, and a workaround
only needed for parallel BSD make. Rewrite the recipe of '%CONFIG_H%'
to be less verbose (with no semantic change intended). Add an
explicative comment. Remove extra blank lines.
[ng] config.h.{bot,top}: don't support anymore (distribution and deps)
The use of those files have been obsoleted since Autoconf commit 5047ea80
of 1994-08-09, "support alternate input file names"; yes, the "1994" in
there is not a typo: those files were already deprecated in Autoconf 2.0.
It's well past time to remove support for them!
For more information, see chapter "Obsolete Constructs", section
"acconfig.h" of the Autoconf manual. See also the discussion on automake
bug#7919, in particular the message <http://debbugs.gnu.org/7819#20>.
* NG-NEWS: Update.
* automake.in (handle_configure): Don't automatically distribute the
'config.h.top' and 'config.h.bot' files if they exist, and don't add
them to the '%FILES%' transform when processing the 'remake-hdr.am'
Makefile fragment. In fact, drop the '%FILES%' transform altogether,
since now it would always expand to empty.
(@common_sometimes): Don't list 'config.h.top' and 'config.h.bot'
anymore.
* lib/am/remake-hdr.am (%CONFIG_HIN%): Don't depend on '%FILES%'
anymore. That transform has been removed now (and wouldn't be needed
anyway).
* t/autodist-config-headers.sh: Remove as obsolete.
[ng] acconfig.h: don't support anymore (distribution and dependencies)
Support for acconfig.h is still present in Autoconf (version 2.69 at the
time of writing), but deprecated by a long time in favour of AH_VERBATIM
and AH_TEMPLATE. The deprecation started at least in September 1999 (see
Changelog entry "Start to get rid of acconfig.h. It is an anachronism",
dated 1999-09-28), and was basically completed by October 1999 (see the
ChangeLog entry "Moving most of the task of creating config.h.in from sh
to m4", dated 1999-10-01), i.e., before the Autoconf 2.50 release (dated
2001-05-21).
For more information, see chapter "Obsolete Constructs", section
"acconfig.h" of the Autoconf manual. See also the discussion on automake
bug#7919, in particular the message <http://debbugs.gnu.org/7819#20>.
* automake.in (handle_configure): Don't automatically distribute the
'acconfig.h' file if it exists, and don't add it to the transform
'%FILES%' when processing the 'remake-hdr.am' Makefile fragment.
(@common_sometimes): Don't list 'acconfig.h' anymore. Reformat it
while we are at it, to make it easier to add or remove entries in
the future.
* t/autodist-acconfig-no-subdir.sh: Remove as obsolete.
* t/autodist-acconfig: Likewise.
* t/confh.sh: Adjust.
* lib/missing (case $program in autoheader*)): Remove any mention
of 'acconfig.h'.
[ng] cleanup: remove obsolete special-handling of default source for libs
Since we are already breaking backward-compatibility in small ways in
Automake-NG, we can snatch the occasion to do some cleanup of obsolescent
behaviours and backward-compatibility hacks. This is the first of such
cleanups.
* automake.in (handle_source_transform): The default source for libfoo.la
is libfoo.c, but for backward compatibility we used look for libfoo_la.c
first. Don't do that anymore now.
* t/ltlibsrc.sh: Remove as obsolete.
* NG-NEWS: Update.
[ng] cleanup: remove a workaround for BSD make (default sources and VPATH)
* automake.in (handle_source_transform): If a rule existed to build a
source file with a $(srcdir) prefix, we used that prefix in our variables
too, for the sake of BSD Make. This is not necessary with GNU make, so
drop it.
* t/vpath-built-sources.sh: New test.
[ng] cleanup: remove a workaround for BSD make (comments continuation)
* automake.in (read_am_file) [$prev_state == IN_COMMENT]: GNU make always
honors escaped newlines in comments, so we don't need to have a workaround
for when that might not be the case.
* t/comment6.sh: Adjust and enhance.
[ng] cleanup: remove obsolescent comments about subdir-objects and deptrack
* automake.in (handle_single_transform): Remove the lengthy historical note
about how, when and why automake started to assume that we can safely emit
an inference rule if both source and object files are in a subdirectory; we
now only care that that is OK with GNU make (which it is).
[ng] cleanup: remove a workaround only needed by Solaris make
The workaround was introduced in commit 'v1.11-257-g20fb9ce' of
2010-05-14, "Work around a bug in file-inclusion mechanism of
Solaris make".
* automake.in (handle_single_transform): When calculating the name
of the dependency file, don't bother collapsing multiple slash
characters into a single one.
* t/subobj11a.sh: Adjust comments. Prefer calling "fatal_ MSG" over
"echo MSG >&2; Exit 1" for hard errors.
* t/subobj11c.sh: Remove as obsolete.
[ng] push_dist_common: don't directly append to an Automake::Variable
This change should cause no semantic changes; it just makes few lines of
code a little cleaner and clearer.
* automake.in ($configure_dist_common): Turn this global scalar into ...
(@configure_dist_common): ... a global array.
(@dist_common): New global, holding the list of the "auto-discovered"
distributed files.
(initialize_per_input): Clear it.
(scan_autoconf_files): Use it, instead of the value of the make variable
'am__dist_common', to initialize '@configure_dist_common'.
(handle_dist): New %transform 'DIST-COMMON => "@dist_common"' for the
'distdir.am' file.
(push_dist_common): Do not call 'Automake::Variable::define' (with "+"
type) on 'am__dist_common' anymore; just append to @dist_common instead.
Adjust few comments throughout the file.
* lib/am/distdir.am: Now that automake.in doesn't define 'am__dist_common'
anymore, initialize it with the contents of the '%DIST-COMMON%' transform.
check: the parallel-tests driver is now the default
The old serial testsuite driver is still supported, and can be activated
by the 'serial-tests' option (introduced by commit 'v1.11-1989-gdeb7773'
of 2012-02-20, "automake: new option 'serial-tests'").
* lib/Automake/Options.pm: Now, the 'parallel-tests' option is a no-op
(but still explicitly recognized, for backward compatibility), while the
'serial-tests' option is recognized and registered.
* automake.in: Adjust to ensure that the parallel test harness is used by
default; mostly, this amounts at using "! option('serial-tests')" where
"option('parallel-tests')" was used before.
* NEWS, doc/automake.texi: Update.
* configure.ac (AM_INIT_AUTOMAKE): Drop 'parallel-tests' option, is
redundant now.
* defs: In the generated AM_INIT_AUTOMAKE call, use the 'serial-tests'
when the serial testsuite harness is to be used, and no option otherwise.
* lib/am/check.am: Use (static) conditional '%SERIAL_TESTS%' instead of
conditional '%PARALLEL_TESTS%'.
* lib/test-driver: Adjust heading comments.
* t/ax/extract-testsuite-summary.pl: Likewise.
* t/check-exported-srcdir.sh: Likewise.
* t/check-subst.sh: Likewise.
* t/java-compile-run-nested.sh: Likewise.
* t/parallel-tests-dry-run-1.sh: Likewise.
* t/parallel-tests-dry-run-2.sh: Likewise.
* t/parallel-tests-interrupt.sh: Likewise.
* t/parallel-tests-many.sh: Likewise.
* t/test-metadata-global-log.sh: Likewise.
* t/tests-environment-backcompat.sh: Likewise.
* m4/init.m4 (AM_INIT_AUTOMAKE): Adjust a comment.
* t/check8.sh: Likewise.
* t/check-tests-in-builddir.sh: Likewise.
* t/java-compile-run-flat.sh: Adjust a botched comment.
* t/ax/tap-summary-aux.sh: Remove explicit use of the 'parallel-tests'
option.
* t/ax/testsuite-summary-checks.sh: Likewise.
* t/aclocal-path-precedence.sh: Likewise.
* t/dist-aux-many-subdirs.sh: Likewise.
* t/parallel-tests-no-color-in-log.sh: Likewise.
* t/parallel-tests-reset-term.sh: Likewise.
* t/parallel-tests-subdir.sh: Likewise.
* t/check-no-test-driver.sh: Fix setup to adjust to the changed
semantics. Update heading comments.
* t/parallel-tests-driver-install.sh: Adjust to the new semantic.
* t/test-driver-is-distributed.sh: Simplified according to the
new semantics.
* master:
tests: use 'parallel-tests' Automake option by default
doc: fix location of Automake's own test-suite.log file
yacc tests: avoid a spurious failure with Sun C++ 5.9
self tests: cater for /bin/ksh symlinked to Zsh
tests: fix spurious failures due to dpkg install-info
+ Non-trivial extra edits:
* t/check7.sh: look at the contents of '$am_serial_tests', not of
'$am_parallel_tests', to decide which kind of testsuite harness is
being used.
* t/parallel-tests-concatenated-suffix.sh: Don't explicitly set
'$am_parallel_tests' to "yes" anymore, is not required and would
cause a 'maintainer-check' failure.
* t/parallel-tests-dynamic.sh: Likewise.
* t/parallel-tests-longest-stem.sh: Likewise.
* t/parallel-tests-no-repeat.sh: Likewise.
* t/parallel-tests-per-suffix-deps.sh: Likewise.
* t/parallel-tests-srcdir-in-test-name.sh: Likewise.
* maint:
tests: use 'parallel-tests' Automake option by default
doc: fix location of Automake's own test-suite.log file
yacc tests: avoid a spurious failure with Sun C++ 5.9
self tests: cater for /bin/ksh symlinked to Zsh
tests: fix spurious failures due to dpkg install-info
tests: use 'parallel-tests' Automake option by default
This will help our transition from 'serial-tests' to 'parallel-tests'
as the default test suite driver enabled by a TESTS assignment in the
input Makefile.am. Note that that change of default will only take
place in master, though.
* defs: Pass the 'parallel-tests' option to the AM_INIT_AUTOMAKE
invocation in the created 'configure.ac' stub, unless the variable
'am_serial_tests' is set to "yes". Don't pay attention anymore to
the 'am_parallel_tests' variable, that's obsolete now.
* defs-static.in: Warn if the 'am_serial_tests' variable is set in the
environment; conversely, don't warn anymore about 'am_parallel_tests'
being set in the environment.
* Makefile.am (AM_TESTS_ENVIRONMENT): Nullify the 'am_serial_tests'
variable instead of the now-obsolete 'am_parallel_tests' one.
* syntax-checks.mk (sc_tests_obsolete_variables): Also warn against
uses of 'am_parallel_tests', which is now deprecated in favor of
'am_serial_tests'. Similarly, if a use of 'parallel_tests' is seen,
suggest using 'am_serial_tests' instead, not 'am_parallel_tests'.
* gen-testsuite-part: Now that we use the 'parallel-tests' by default
in our tests, we need to completely change the logic and semantics of
generation of sibling tests for those tests that check the Automake
generated testsuite harness itself. Do that, and give a complete
explanation of the new logic and semantics in the relevant comments.
* t/README: Update.
* Lots of test cases: Adjust.
* ng/parallel-tests:
[ng] perf: optimize 'am__strip_suffixes' for speed
[ng] check: memoize some internal vars (avoid useless recalculation)
[ng] check: per-suffix dependencies for test cases
[ng] check: few minor simplifications
[ng] tests: remove overly picky test cases (and fix few typos)
[ng] check: AM_LAZY_CHECK="yes", not RECHECK_TESTS="", for lazy re-runs
[ng] check: refactor: split recipes for check-TESTS and recheck
[ng] check: minor refactoring (prefer make time over recipe time)
[ng] check: minor refactoring (reorder code)
[ng] check: refactor (better names for internal vars)
[ng] check: refactoring to reduce code duplication
[ng] refactor: get rid of am__EXEEXT (automake conditional and %transform)
[ng] check: big refactoring with semantic changes in parallel-tests support
* ng/doc:
[ng] docs: adjusted outdated make output in an example
[ng] doc: get rid of automake-history.texi
[ng] doc: rename automake.texi -> automake-ng.texi
[ng] doc: reference "Automake-NG" rather than "Automake" in few places
[ng] docs: adjusted outdated make output in an example
* doc/automake-ng.texi (Built Sources Example): Fix the expected make
output not to report hand-rolled VPATH rewriting that automake-generated
rules do not perform anymore. Modernize the output from gcc as well.
GNU make doesn't do VPATH rewrites a' la' Solaris make, but does VPATH
rewrites for the '$<' automatic variable. Take advantage of these facts
to simplify some texinfo-related recipes.
It is worth nothing that with this change, Automake-generated texinfo
rules will assume Texinfo >= 4.1. Since that is more than 10 years old,
this new requirement should be perfectly acceptable.
* lib/am/texi-vers.am, lib/am/texibuild.am: Simplify some rules by
assuming Texinfo >= 4.1 and GNU make VPATH semantics.
* doc/automake-history.texi: Remove, it's already maintained as a part
of mainline Automake.
* Makefile.am (info_TEXINFOS): Adjust.
(doc_automake_history_TEXINFOS): Remove.
[ng] doc: reference "Automake-NG" rather than "Automake" in few places
We only do the change in few key places, which are the most relevant
and visible ones, and which ar also very unlikely to change. We do
not do the Automake -> Automake-NG substitution throughout, because
we don't want to cause extra conflicts or inconsistency when merging
changes from the 'master' branch into 'ng/master'.
* doc/automake.texi: Reference "Automake-NG" rather than "Automake" in
few key places, to minimize the possibility of confusing the user.
In particular, do so in the '@top', '@setfilename' and '@settitle'
declarations, in the "front-cover", and in the introduction.
(PACKAGE_BUGREPORT): Redefine to 'automake-ng@gnu.org' rather than
to 'bug-automake@gnu.org'.
(Reporting Bugs): A bug reported to 'automake-ng@gnu.org' will not
cause anymore an issue to be opened automatically in the Automake
bug tracker; account for this.
Remove any reference to the old Automake Gnats database.
Adjust the list of authors, adding Ralf Wildenhues and myself (Stefano
Lattarini).
* doc/amhello/README: Adjust to match what is reported in the manual.
doc: fix location of Automake's own test-suite.log file
* doc/automake.texi (Reporting Bugs): The global testsuite log of
Automake is now (basically since we have removed make recursion from
the Automake's build system) saved in the file 'test-suite.log', not
in the file 'tests/test-suite.log'. Adjust accordingly.
Nikolai Weibull [Wed, 16 May 2012 16:16:41 +0000 (18:16 +0200)]
ylwrap: preserve subdirectories in "#line" munging
If Automake is used in non-recursive mode and one of the inputs is a
yacc file, for example, "src/grammar.y", ylwrap will remove too many
directories from the output file when it adjusts the paths in it.
This results in #line directives referring to "grammar.y" instead of
"src/grammar.y".
This is a result of $input_rx simply taking all the directory
components of the absolute input path and removing them.
One solution is to store the path passed to ylwrap and replace
$input_rx with it. This is what we do.
Suggestion and initial patch (without tests) by Nikolai Weibull:
<http://lists.gnu.org/archive/html/automake/2012-05/msg00013.html>
Final patch by Stefano Lattarini.
* lib/ylwrap ($input_sub_rx): New.
When munging the #line directives, substitute '$input_rx' with it,
instead of stripping it altogether.
Adjust comments.
* t/yacc-line.sh, t/lex-line: Adjust and extend.
* NEWS, THANKS: Update.
This commit should cause no semantic change in the ylwrap behaviour.
It will only be needed in light of a future change. See:
<http://lists.gnu.org/archive/html/automake/2012-05/msg00013.html>
* lib/ylwrap (get_dirname, quote_for_sed): New functions, factoring
out some non-trivial code. Use them where appropriate.
yacc tests: avoid a spurious failure with Sun C++ 5.9
* t/yacc-cxx.sh (parse1.yy): When calling the 'getchar' function declared
in the #included <cstdio>, fully qualify it as std::getchar', to avoid
Sun C++ 5.9 erroring out with:
"parse1.yy", line 5: Error: The function "getc" must have a prototype.
* t/yacc-clean-cxx.sh (sub1/parsefoo.yxx): Likewise.
* t/self-check-reexec.tap: When searching for a suitable non-Bash
shells, be sure to reject any shell that is Zsh "in disguise" (as
can be found on some Debian systems, where /bin/ksh can be symlinked
to /bin/zsh4). This is required because our testsuite does not
support older versions of Zsh, and that was causing the test to fail
in the setup just described.
tests: fix spurious failures due to dpkg install-info
* t/install-info-dir.sh: Skip some checks if 'install-info' is the one
from dpkg, not the one from GNU info; the former might try to create
files in '/var/backups/', causing spurious failures like this for any
non-root user:
install-info(.../install-info-dir.dir/_inst/info/foo.info): \
creating new section `Dummy utilities'
cp: cannot create regular file `/var/backups/infodir.bak': \
Permission denied
install-info(.../install-info-dir.dir/_inst/info/foo.info): \
could not backup .../install-info-dir.dir/_inst/info/dir in \
/var/backups/infodir.bak: No such file or directory
[ng] perf: optimize 'am__strip_suffixes' for speed
This optimization offers some noticeable performance improvements for
packages having a lot of tests and using the Automake-provided parallel
testsuite harness; this is due to the fact that the internal automake
variable 'am__test_bases' used by it is calculated through a proper call
to 'am__strip_suffixes'.
More precisely, we have measured the times required to complete null
"make all", "make recheck" and "make check AM_LAZY_CHECK=yes"
invocations in a package with 5000 tests in the top-level directory
and other 5000 tests in a subdirectory. Here are the results,
averaged on a several runs:
+ Before this patch:
- "make all" 2.7 seconds
- "make recheck" 3.9 seconds
- "make check AM_LAZY_CHECK=yes" 15.2 seconds
+ After this patch:
- "make all" 0.4 seconds
- "make recheck" 1.7 seconds
- "make check AM_LAZY_CHECK=yes" 7.2 seconds
See also previous commit v1.12-233-g0010655 "[ng] check: memoize some
internal vars (avoid useless recalculation)" for another (weaker)
optimization.
The need for this optimization has been suggested by Bob Friesenhahn:
<http://lists.gnu.org/archive/html/automake-ng/2012-05/msg00045.html>
* lib/am/header-vars.am (am__strip_suffixes): Rewrite in a way
that allows much better performance.
(am__private_suffix): New internal variable, used by the new
implementation.
(am__strip_suffixes): Remove, it's not needed anymore.
* t/internals.tap: Adjust.
[ng] check: memoize some internal vars (avoid useless recalculation)
Thanks to our recently-introduced support for memoization of make
variables, we can avoid some useless re-calculation of few internal
variables used by the parallel testsuite harness support, thus
improving performances in some common use cases.
More precisely, we have measured the times required to complete null
"make all", "make recheck" and "make check AM_LAZY_CHECK=yes"
invocations in a package with 5000 tests in the top-level directory
and other 5000 tests in a subdirectory. Here are the results,
averaged on a several runs:
+ Before this patch:
- "make all" 2.9 seconds
- "make recheck" 4.9 seconds
- "make check AM_LAZY_CHECK=yes" 18.1 seconds
+ After this patch:
- "make all" 2.7 seconds
- "make recheck" 3.9 seconds
- "make check AM_LAZY_CHECK=yes" 15.2 seconds
So we still have a problem with "make all". That's due to performance
issues with the internal make function 'am__strip_suffixes', which will
be dealt with in a later patch.
[ng] check: per-suffix dependencies for test cases
Akim Demaille asked (in automake bug#11287) for a way to specify extra
dependencies for the test cases, depending on their extension (or lack
thereof). Now that Automake-NG uses pattern rules instead of old-fashion
suffix rules to generate '.log' and '.trs' files from test cases, doing
that is trivial.
* NG-NEWS: Update.
* doc/automake.texi: Document the new feature.
* automake.in (handle_per_suffix_test): Mark the contents of the
'${pfx}LOG_DEPENDENCIES' variable as processed (required to avoid
spurious errors).
* lib/am/check2.am (%.log, %.trs): Depend on '$(%PFX%LOG_DEPENDENCIES)'.
* t/parallel-tests-per-suffix-deps.sh: New test.
* t/parallel-tests-log-compiler-example.sh: Renamed ...
* t/parallel-tests-logvars-example.sh: ... to this, and adjusted to
be more faithful to the updated documentation.
* lib/check.am (recheck): Don't remove $(TEST_SUITE_LOG) by hand, that is
already done automatically by the recursively-invoked rule 'check-TESTS'.
(check-TESTS): Don't check that $(TEST_SUITE_LOG) expands to a non-empty
string before removing it.
[ng] tests: remove overly picky test cases (and fix few typos)
Given the new shape of the parallel testsuite support implementation as
derived from Automake 1.12 and further enhanced in recent Automake-NG
commits, few tests for it have become overly picky, basically impossible
to fail unless many others do as well, or the implementation is altered
radically (basically being rewritten). So, to avoid having out already
too slow test suite bogged down even further, we remove them.
* t/parallel-tests-cmdline-override.sh: Removed, the still-relevant part
of its checks moved ...
* t/parallel-tests-dynamic.sh: ... in here.
* t/parallel-tests-log-override-2.sh: Removed.
* t/parallel-tests-log-override-recheck.sh: Likewise.
* t/parallel-tests-no-spurious-summary.sh: Likewise.
* t/tap-no-spurious-summary.sh: Likewise.
* t/parallel-tests-log-override-1.sh: Renamed ...
* t/parallel-tests-log-override.sh: ... like this, to avoid confusion.
* t/parallel-tests-extra-program.sh: Fix a typo.
* t/tap-todo-skip.sh: Likewise.
* t/tap-deps.sh: Likewise.
* t/parallel-tests-longest-stem.sh: Remove an extra empty line.
* t/parallel-tests6.sh: Add a proper empty line, for better readability.
[ng] check: AM_LAZY_CHECK="yes", not RECHECK_TESTS="", for lazy re-runs
This causes a backward-incompatibility with mainline automake, but will
also offer a cleaner API and a possibility to further simplify the
implementation of the 'check' and 'recheck' targets in the future.
* doc/automake.texi, NG-NEWS, t/README: Update.
* lib/am/check.am (am__remove_if_not_lazy_check): New internal function,
expanding to shell code that removes the given list of files unless the
'AM_LAZY_CHECK' variable is set to "yes".
(check-TESTS): Use it instead of the contents of 'RECHECK_LOGS' top
decide which .log and .trs files to remove.
(RECHECK_LOGS): Don't define anymore.
* t/parallel-tests.sh: Adjust.
* t/parallel-tests-extra-programs.sh: Likewise.
* t/test-trs-recover.sh: Likewise.
* t/tap-recheck-logs.sh: Rename ...
* t/tap-lazy-check.sh: ... to this, and adjust.
* defs: Don't unset 'RECHECK_LOGS'; unset 'AM_LAZY_CHECK' instead.
* syntax-checks.mk: Adjust some comments.
(sc_no_RECHECK_LOGS): New maintainer check, guard against uses of
the now-obsolete 'RECHECK_LOGS' variable.
(syntax_check_rules): Add it.
[ng] check: refactor: split recipes for check-TESTS and recheck
Their implementation has diverged to the point that it's now simpler
and clearer to keep them separate.
* lib/am/check.am (check-TESTS, recheck): Split their recipes, and
minor relate changes.
* t/parallel-tests-dynamic.sh: Simplify an overly tricky check that
has been broken by this change.
[ng] check: minor refactoring (prefer make time over recipe time)
No semantic change intended.
* lib/am/check2.am [%?FIRST%] (am__is_xfail_test): New internal helper
function.
(am__runtest): Use that, the $(if) built-in, and a minor reorganization
to shave off few lines of code, and to favor processing by make over
processing by the shell.
This is just movement and minor reorganization of code; no semantic
change is intended.
* lib/am/check.am (am__sh_e_setup): Moved ...
* lib/am/header-vars.am (am__sh_e_setup): ... here.
* lib/am/check.am (am__check_pre, am__common_driver_flags): Removed,
their contents merged ...
* lib/am/check2.am [%?FIRTS%] (am__runtest): ... into this. Other
related whitespace and indentation changes since we are at it.
* automake.in, lib/am/check.am, t/parallel-tests-empty-tests.sh,
t/test-trs-basic.sh, t/serial-tests.sh: Update accordingly.
* syntax-checks.mk (sc_no_am_TEST_BASES, sc_no_am_TEST_RESULTS,
sc_no_am_TEST_LOGS): New maintainer checks, to ensure the old
names are not used by mistake.
(syntax_check_rules): Add them.
[ng] check: refactoring to reduce code duplication
* lib/am/check.am (am__strip_suffixes): New internal function, factoring
the code used to "normalize" a list of test scripts (i.e., removing any
registered test extension and any leading $(srcdir) component).
(am__TEST_BASES, am__xfail_test_bases): Redefine using that function.
(am__cooked_tests, am__cooked_xfail_tests): Remove as obsolete.
* t/parallel-tests-empty-tests.sh: Don't bother checking the contents
of $(am__cooked_tests) anymore.
[ng] refactor: get rid of am__EXEEXT (automake conditional and %transform)
We can substitute that with a static automake conditional %HANDLE-EXEEXT%
and a make runtime check on the non-emptiness of $(EXEEXT).
* automake.in (preprocess_file): New transform '%HANDLE-EXEEXT%', TRUE
if 'EXEEXT' has been AC_SUBST'd, FALSE otherwise.
(handle_tests): Don't define the transform '%HANDLE-EXEEXT%' anymore
when processing 'check.am': that is now done transparently by the
'preprocess_file' function.
(handle_per_suffix_test): Don't process the transform '%am__EXEEXT%'
anymore when reading 'check2.am'. It's superseded by '%HANDLE-EXEEXT%'
and ...
* lib/am/check2.am [%HANDLE-EXEEXT%]: ... by a make-runtime check that
$(EXEEXT) is not empty.
* m4/init.m4 (AM_INIT_AUTOMAKE): Simplify, taking advantage of the fact
that we don't need the Automake conditional "am__EXEEXT" anymore.
* t/parallel-tests-exeext.sh: Tiny simplification.
[ng] check: big refactoring with semantic changes in parallel-tests support
In this change, we move some further processing related to the parallel
testsuite harness support from Automake runtime to make runtime.
A welcome collateral effect of this is that we are now able to cope
with test scripts whose name ends with several concatenated suffixes.
Another (less welcome) collateral effect of the present change is that
the user now cannot override TEST_LOGS at make runtime anymore:
# This won't work anymore!
make check TESTS_LOGS="foo.log bar.log baz.log"
This admittedly is a small(ish) regression. But it's not a real problem,
since we now explicitly allow *and document* that TESTS can be overridden
at runtime without bothering to add the test suffixes to its entries:
# This will work even if complete names of the tests are (say)
# "foo.test", "bar.test$(EXEEXT)" and "baz$(EXEEXT)".
make check TESTS="foo bar baz"
With such usage, the user don't have to bother knowing which the exact
extensions of each tests are -- which was precisely the only advantage
of overriding TEST_LOGS instead of TESTS.
* NG-NEWS: Update.
* doc/automake.texi: Likewise.
* lib/am/header-vars.am (am__strip_suffixes_0, am__strip_suffixes): New
internal macros ...
* t/internals.tap: ... covered by new checks in this test, and used ...
* lib/am/check.am (am__xfail_test_bases): ... to define this new internal
variable in term of $(am__cooked_xfail_tests) (and thus eventually of
$(XFAIL_TESTS)), and to ...
(am__TEST_BASES): ... (re)define this pre-existing internal variable in
terms of $(am__cooked_tests) (and thus eventually of $(TESTS)), rather
than in terms of $(TEST_LOGS) as was done before.
(am__TEST_RESULTS, am__TEST_LOGS): Define in terms of $(am__TEST_BASES).
(TEST_LOGS): Define to $(am__TEST_LOGS), for backward-compatibility.
($(TEST_SUITE_LOG)): Depend on $(am__TEST_RESULTS) rather than on
$(TEST_LOGS).
(am__check_pre): Use $(am__xfail_test_bases) and new temporary shell
variable $f2, instead of $(am__cooked_xfail_tests) and $f, to decide
whether a test is expected to fail or not.
Fix some imprecise or botched comments since we are at it.
(check-TESTS, recheck): When re-invoking make recursively, override
am__TEST_BASES rather than TEST_LOGS. Relate tweaks.
* automke.in (handle_tests): Pass new transform %HANDLE-EXEEXT% when
including check.am (used for the definitions of am__xfail_test_bases
and am__TEST_BASES). Don't define the TEST_LOGS make variable, nor the
auxiliary make variables am__test_logs1, am__test_logs2, etc. Put
$(am__TEST_LOGS) and $(am__TEST_RESULTS) among the "mostlyclean" files
(rather than "$(TEST_LOGS)" and "$(TEST_LOGS:.log=.trs)" as before).
* t/parallel-tests-concatenated-suffix.sh: New test.
* t/nodeps.sh: Delete, it was causing too much spurious failures.
* t/color2.sh: Avoid a spurious failure by not calling make with
the '-e' flag.
* t/parallel-tests-exeext.sh: Extended to check the user is not
forced to specify the test suffixes nor the $(EXEEXT) suffix
when overriding TESTS on the command line.
* t/check-concurrency-bug9245.sh: Adjust to the new semantics of "no
TEST_LOGS overriding from the command line".
* t/parallel-tests-cmdline-override.sh: Likewise.
* t/parallel-tests-dynamic.sh: Likewise.
* t/parallel-tests-fork-bomb.sh: Likewise.
* t/parallel-tests-log-override-2.sh: Likewise.
* t/tap-basic.sh: Likewise.
* t/test-driver-custom-multitest-recheck2.sh: Likewise.
* t/test-missing.sh: Likewise.
* t/test-trs-basic.sh: Likewise.
* t/test-trs-recover.sh: Likewise.
* t/parallel-tests-empty-tests.sh: Likewise, and extended to check
that an empty TESTS produces am__cooked_tests, am__TEST_RESULTS,
am__TEST_BASES and am__TEST_LOGS that are empty as well.
* t/parallel-tests.sh: Adjust to the new semantics of "no TEST_LOGS
overriding from the command line". Remove a workaround required only
by HP-UX make. Make some "FIXME"-style comments stick out.
* t/serial-tests.sh: Adjust some checks that grep the Automake
generated Makefile.in.
* t/memoize.tap: Four new tests: three on memoized variables expanded
as arguments of a function call, one on memoized variables expanded
inside other memoized variables. While we are at it, improve brief
description of few existing tests.
Since that bug basically prevents dynamically reassigning to a variable
inside the expansion of the variable itself, we reimplement memoization
by having the memoized variable expanding to an $(if) branching either
to evaluate-and-store in *another* memo variable, else to the value of
that memo variable.
The new workaround works also in the situation that was causing our
previous workaround (as implemented in commit v1.12-217-gd55204f of
2012-05-12, "[ng] vars: implement memoization of make variables (new
'am__memoize' func)") to fail.
Approach suggested by Akim Demaille:
<http://lists.gnu.org/archive/html/automake-ng/2012-05/msg00074.html>
and coded by Stefano Lattarini.
* lib/am/header-vars (am__memoize): Change API and implementation.
(am__memoize_0): Delete, it's not needed anymore.
* t/memoize.tap: Update to new API, also removing checks that makes no
more sense with it.
* t/spy-override.sh: Delete, it's not needed anymore.
When trying to use 'am__memoize' in a non-trivial setup (to optimize
the new form of the parallel-tests harness implemented by the series
http://lists.gnu.org/archive/html/automake-ng/2012-05/msg00015.html),
we stumbled upon that bug again. At this point, it's quite clear that
there is no safe way to safely avoid it, so we'll have to find a way
to enable memoization (that is just an optimization) only with GNU
make >= 3.83 (once that is out).
Here, we just enhance our testsuite to expose the (re)discovered
issue.
* t/memoize.tap: Enhance. The new check fails with GNU make <= 3.82,
and passes with the development version of GNU make (which should
become GNU make 3.83 eventually).
[ng] vars: implement memoization of make variables (new 'am__memoize' func)
This is a preparatory patch that introduces on-demand memoization through
the use of the new internal make function 'am__memoize'. Rationale and a
more detailed explanation follow.
In GNU make (as well as in portable make), "recursive" variables (the
default kind, deriving from assignments like "var = value") have their
value recomputed every time they get expanded.
Most of the time, this has no actual impact on performance, since the
value of a recursive variable is usually either static:
prefix = /usr/local
or only contains references to other recursive variables with static
values:
datadir = ${prefix}/share
In other cases, though, the expansion of the value might require some
non-trivial calculation, or other time-costly operation:
Having such operation performed over and over again (each time the
variable is expanded) might become inefficient, sometimes intolerably
so.
"Immediate" variables (deriving from assignments like "var := value")
are better in this respect, since their definition evaluates the RHS
(Right-Hand Side) immediately, and only once.
But immediate variables have their drawbacks as well.
First of all, the fact that the RHS is expanded immediately means that
the definition of immediate variables is overly sensitive to ordering,
in that any variable referenced in the RHS must be completely defined
before the definition of the affected immediate variable is seen.
Ensuring this might be tricky in general, and even more so with Automake,
which performs non-trivial reordering of make variable.
Also, the RHS of an immediate variable definition is computed
unconditionally, which might be wasteful if only few of the immediate
variables defined in the Makefile are actually going to be used in
a given make invocation.
So we'd like to go for a good middle ground solutions: implementing
memoization for recursive-evaluations variable which are expected to
be expanded often.
Still, we *seem* to have found an implementation that works around the
above issue. Referencing again the examples above, we would now write
something like this:
This API is a little more verbose and clumsy than we'd like, but since
it apparently doesn't tickle the nasty bug referenced above, we'll stick
with it for the moment.
The idea of memoizing recursive variables stemmed from a suggestion
by Akim Demaille:
<http://lists.gnu.org/archive/html/automake-ng/2012-05/msg00062.html>
* lib/am/header-vars.am (am__memoize): New internal function.
(am__memoize_0): Likewise.
* t/memoize.tap: New test, checking $(am__memoize).
* t/spy-override.sh: New test, check that we can use the 'override'
directive as we do in the 'am__memoize' implementation.
* t/parallel-tests-fork-bomb.sh: Export LANG, LANGUAGE and LC_ALL to
'C', to ensure error messages will be in English, and thus avoiding
possible false negatives in our grepping of them.
* ng/distdir-refactor:
[ng] dist: optimize calculation of list of distributed file
[ng] dist: rename some non-public vars to make clear they are internal
[ng] dist: strip duplicates from dist files at make (not automake) runtime
[ng] dist: simplify VPATH handling
[ng] dist: optimize calculation of list of distributed file
Our implementation of the $(am__uniq) make function is slow as
hell when applied to big lists. Since that function is used to
(re)calculate the list of distributed files, its inefficiency
reflects on *every* run of a Makefile generated by Automake which
distributes a lot of files. For example, a null build of the
Automake tree now takes 20 seconds (!) on my Debian system, while
earlier it was practically instantaneous (less than half a second).
Luckily, the GNU make manual documents that the $(sort) built-in
also strip duplicates from the sorted list. Since we don't care
about the order of the distributed files (or directories thereof),
we can use $(sort ...) instead of $(call am__uniq, ...), and live
happily.
* lib/am/distdir.am (am__dist_files)_: Uniqify content using
'$(sort)', not '$(am__uniq)'.
(am__dist_parent_dirs): Likewise.
Pattern rules are cleaner, safer, and vouched for in the GNU make manual
itself. Supporting them instead of suffix rules will also allow us to
simplify a little the automake script, auxiliary perl modules, and
documentation.
This change introduces a slight backward-incompatibility now, in that
user provided definitions of the SUFFIXES variable or of the .SUFFIXES
target, as well as old-fashioned suffix rules, are now rejected.
Automake-NG still tries to parse and understand suffix-based pattern
rules though, to retain support for user-added file extensions in the
_SOURCES variables (see "Handling new file extensions" in the Automake
manual).
Note that suffix-based pattern rules with dot-less suffix are *not*
supported.
* NG-NEWS: Update.
* doc/automake.texi: Likewise.
* lib/am/footer.am: Declare '.SUFFIXES:' with empty dependencies, to
neutralize the default suffix rules.
* automake.in (&handle_footer): Reject the 'SUFFIXES' variable. Don't
process its content anymore. Don't generate the .SUFFIXES special target
anymore.
(&var_SUFFIXES_trigger): Remove. And don't install it as an hook for the
now-deprecated 'SUFFIXES' variable.
* lib/Automake/Rule.pm (&define): Don't process old-fashioned suffix
rules specially, but just reject them. Instead, process pattern rules
specially.
($_SUFFIX_RULE_PATTERN): Made local to the '&define' function, renaming
it as '$suffix_rule_rx'.
(&suffixes, @_suffixes): Delete, they are no more used.
(@EXPORT): Adjust.
(register_suffix_rule): Don't extend '@_suffixes' anymore.
(reset): Don't reset '@_suffixes' anymore.
* t/ext3.sh: Remove as obsolete.
* t/suffix4.sh: Likewise.
* t/suffix6.sh: Likewise.
* t/suffix6b.sh: Likewise.
* t/suffix7.sh: Likewise.
* t/suffix11.tap: Likewise.
* t/suffix6c.sh: Rename ...
* t/suffix-obj.sh: .. like this, and adjust.
* t/suffix-chain.tap: Rewrite a as "simple" test (rather than as
a TAP test), adjust, and rename ...
* t/suffix-chain.sh: ... like this.
* t/suffix3.tap: Likewise rewrite and rename ...
* t/suffix3.sh: ... like this.
* t/suffix8.tap: Likewise rewrite and rename ...
* t/suffix8.sh: ... like this.
* t/suffix10.tap: Likewise rewrite and rename ...
* t/suffix10.sh: ... like this.
* t/suffix5.sh: Adjust.
* t/suffix9.sh: Likewise.
* t/suffix13.sh: Likewise.
* t/parallel-tests8.sh: Likewise.
* t/warnings-strictness-interactions.sh: Likewise.
* t/warnings-win-over-strictness.sh: Likewise.
* t/warnings-precedence.sh: Likewise.
* t/warnings-override.sh: Likewise.
* t/warning-groups-win-over-strictness.sh: Likewise.
* t/amopts-variable-expansion.sh: Likewise.
* t/specflg10.sh: Likewise.
* t/suffix-rules-reject.sh: New test.
[ng] rules: can pass deps to &Automake::Rule::define
This change is only useful in view of future changes.
* lib/Automake/Rule.pm (define): Add parameter '$deps' (still unused).
Adjust comments and POD documentation.
* automake.in (file_contents_internal, read_am_file) [/$RULE_PATTERN/]:
Also pass the list of dependencies to the 'Automake::Rule::define'
invocation.
[ng] am: prefer pattern rules over old-fashioned suffix rules
The use of pattern rules is cleaner, safer, and vouched for in the
GNU make manual itself. Moreover, it will allow us to obtain some
simplifications in the automake script and the documentation in
future changes.
* lib/am/texinfos.am: Turn this suffix rules into pattern rules.
* lib/am/texibuild.am: Likewise.
* lib/am/depend2.am: Likewise.
* lib/am/yacc.am: Likewise.
* lib/am/lex.am: Likewise.
* lib/am/lang-compile.am: Likewise. Also, since we are at it, remove
extra blank lines and quote 'like this' rather than `like this'.
* t/ext.sh: Adjust.
* t/objc-basic.sh: Likewise.
* t/objcxx-basic.sh: Likewise.
* t/txinfo6.sh: Likewise.
* t/suffix.sh: Likewise.
* t/suffix2.sh: Likewise. Also, define a dummy LIBTOOL in Makefile.am
instead of requiring the libtool macros.
* t/cxx.sh: Remove as obsolete.
* t/nodep.sh: Likewise.
[ng] cleanup: remove unused function 'scan_variable_expansions'
* lib/Automake/Variable.pm (scan_variable_expansions): Delete, it's
not used anymore since commit 'v1.11-1779-g9a82dcd' of 2012-02-23,
"[ng] vars: don't warn about non-POSIX names or GNU make function calls".
[ng] cleanup: use .DEFAULT_GOAL to set the default rule
This change should introduce no semantic change, but allows
a minor simplification in automake.in.
* automake.in ($output_all): Don't define nor use anymore,
its role and function merged with '$output_rules'.
* lib/am/header-vars.am (.DEFAULT_GOAL): Define to 'all'.
* NG-NEWS: Don't list the fact that "support for silent rules is now
always active in Makefiles generated by Automake-NG" as a news entry.
That is now true also for the development version of Automake (since
commit 'v1.12-34-g14141f2' of 2012-05-01, "silent rules: support for
them is always active now".
* master:
fixup: s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/ in 't/confsub.sh'
tests: fix a spurious failure with dash
test defs: fix indentation (cosmetic change)
tests: remove obsolete uses of $sh_errexit_works
configure: search a sturdy POSIX shell to be used in the testsuite
tests: shell running test scripts is now named AM_TEST_RUNNER_SHELL
fixup: distribute t/README
init: warn against obsolete usage of AM_INIT_AUTOMAKE
* maint:
tests: fix a spurious failure with dash
test defs: fix indentation (cosmetic change)
tests: remove obsolete uses of $sh_errexit_works
configure: search a sturdy POSIX shell to be used in the testsuite
tests: shell running test scripts is now named AM_TEST_RUNNER_SHELL
fixup: distribute t/README
init: warn against obsolete usage of AM_INIT_AUTOMAKE
* testsuite-saner-shell:
tests: fix a spurious failure with dash
test defs: fix indentation (cosmetic change)
tests: remove obsolete uses of $sh_errexit_works
configure: search a sturdy POSIX shell to be used in the testsuite
tests: shell running test scripts is now named AM_TEST_RUNNER_SHELL
After the last changes, configure will ensure that the shell
selected to run the test scripts can correctly propagate exit
status to the exit trap when 'set -e' is in effect.
* configure.ac (sh_errexit_works): Do not AC_SUBST it anymore.
* defs-static.in (sh_errexit_works): Do not initialize
from the AC_SUBST value anymore.
* defs (trap): Trap the EXIT signal unconditionally.
* t/self-check-explicit-skips.sh: Do not skip the test if
'$sh_errexit_works' is != "yes", this check doesn't make
sense anymore.
* t/self-check-cleanup.tap: Likewise.
* t/self-check-exit.tap: Assume the exit trap is always
installed by ./defs.
configure: search a sturdy POSIX shell to be used in the testsuite
* configure.ac: Add code (partially inspired to checks in gnulib's
'tests/init.sh') to search for a good-enough, not-buggy POSIX/XSI
shell to be used in our testsuite. Accordingly AC_SUBSTitute the
variable 'AM_TEST_RUNNER_SHELL'.
* NEWS: Update.