* t/gettext.sh: Move checks about PR/381 ...
* t/gettext-pr381.sh: ... to this new test.
* t/gettext.sh: Move checks about config.rpath requirement ...
* t/gettext-config-rpath.sh: ... to this new test.
[ng] tests: avoid spurious failure in a gettext test
* t/gettext2.sh: Here, remove obsolete grepping checks in favor
of more modern ones.
* t/gettext.sh: Likewise. This doesn't fix any failure, but
makes the test more reliable.
[ng] tests: adjust weaknesses in the gettext tests
* t/gettext-macros.sh (m4/mk-dirp.m4): Define 'AM_PROG_MKDIR_P' rather
than 'AM_MKDIR_P', and in doing so, use 'AC_PROG_MKDIR_P' rather than
'AC_MKDIR_P'.
[ng] distcheck: --with-included-gettext: with a variable, not a transform
This is mostly a preparatory refactoring in view of future changes.
* automake.in (handle_dist): Define the new internal variable
'am.dist.handle-gettext' to "yes" if the package uses gettext,
to the empty string otherwise. This takes over the role of the
transform 'GETTEXT', which has thus been removed.
* lib/am/distdir.am (distcheck): Adjust to rely on the new variable
instead than of the removed transform.
[ng] disthook: with an internal variable, not a transform
This is mostly a preparatory refactoring in view of future changes.
* automake.in (handle_dist): Define the internal variable
'am.dist.handle-distcheck-hook' to "yes" if a user-defined
'distcheck-hook' rule, to the empty string otherwise. This
take over the role of the transform 'DISTCHECK-HOOK', which
has thus been removed.
* lib/am/distdir.am (distcheck): Adjust to rely on the new
variable instead than of the removed transform.
* t/distcheck-hook.sh: Remove obsolete or obsolescent grepping
checks.
* t/distcheck-hook2.sh: Likewise.
* master:
cleanup: remove two almost-unused global variables: {am,in}_file_name
cleanup: remove almost-unused global var 'topsrcdir'
automake: remove an unused variable
tests: make a test script more semantic
tests: remove an obsolete, no-op test script
tests: remove an obsolete test script
* ng/inst-work:
[ng] uninstall: refactor, more processing delegated to GNU make
[ng] uninstall: reimplement various recipes using more GNU make features
[ng] am.xargs-map: can pass further arguments to the mapped function
[ng] refactor: remove all uses of $(am__nobase_strip{,_setup})
[ng] refactor: remove all uses of '$(am__strip_dir)'
* lib/am/dejagnu.am: Rename ...
* lib/am/dejagnu.mk: ... like this, and rewrite partially to make it
readable verbatim.
* Makefile.am (dist_am_DATA): Adjust.
* automake.in (handle_tests): When DejaGNU support is needed, include
'dejagnu.mk' verbatim in the output Makefile.
* t/dejagnu2.sh: Adjust.
* lib/am/dejagnu.am: Rename ...
* lib/am/dejagnu.mk: ... like this, and rewrite partially to make it
readable verbatim.
* Makefile.am (dist_am_DATA): Adjust.
* automake.in (handle_tests): When DejaGNU support is needed, include
'dejagnu.mk' verbatim in the output Makefile.
* maint:
cleanup: remove two almost-unused global variables: {am,in}_file_name
cleanup: remove almost-unused global var 'topsrcdir'
automake: remove an unused variable
tests: make a test script more semantic
tests: remove an obsolete, no-op test script
tests: remove an obsolete test script
[ng] refactor: drop 'HOST', 'BUILD' and 'TARGET' transforms
Instead, use the new make variables $(am.conf.host-triplet),
$(am.conf.build-triplet) and $(am.conf.host-triplet) are defined.
* automake.in (preprocess_file): Drop 'HOST', 'BUILD' and 'TARGET'
transforms. Their role taken over ...
(generate_makefile): ... by the new variables 'am.conf.host-triplet',
'am.conf.build-triplet' and 'am.conf.target-triplet' defined here.
* lib/am/dejagnu.am: Adjust.
* t/triplet.sh: New test.
* automake.in ($am_file_name, $in_file_name): Delete these, which were
used only in the 'read_main_am_file' subroutine; instead ...
(read_main_am_file): ... modify it to only work from the '$makefile_am'
argument (which it was already receiving), and the new '$makefile_in'
argument, which is now passed to it ...
(generate_makefile): ... from here.
(initialize_per_input): Don't reset the two deleted variables anymore.
* automake.in ($topsrcdir): Delete, it was only used once ...
(handle_LIBOBJS_or_ALLOCA): ... in here, so it's simpler to inline
its expansion. Improve formatting of immediately surrounding code
a little while we are at it.
(initialize_per_input): Don't reset the deleted variable.
* lib/am/tags.am: Moved ...
* lib/am/tags.mk: ... here, rewrite to be included verbatim, reformatted,
and enhanced to take over the role of ...
* automake.in (handle_tags): ... this function as well, which has thus
been removed.
(generate_makefile): Call the removed function no more. Include 'tags.mk'
verbatim in the generated Makefile.
* Makefile.am (dist_am_DATA): Adjust.
* t/tags.sh: This weak grepping test is broken by the other changes done
here; so remove it, adding ...
* t/tags-id.sh: ... this in its place, which is more semantic, i.e.,
operated by actually running the 'ID' target.
* t/tags2.sh: Remove as obsolete.
* t/location.sh: Adjust to avoid spurious errors.
* t/targetclash.sh: Likewise.
* automake.in (generate_makefile): Define that variable to "yes" if the
Makefile being currently generated is in the top-level directory, define
it to the empty string otherwise. This offers a way (alternative to the
'%?TOPDIR_P%' transform) to determine whether a recipe is being executed
in the top-level directory or not.
This will also simplify future changes aimed at making the current
'tags.am' makefile fragment included more "verbatim".
* lib/am/tags.am (am.tags.include-option): New internal variable, the
include-like option used by the $(EATGS) problem. This must be
determined dynamically because Exuberant Ctags wants '--etags-include'
while GNU Etags wants '--include'.
(am.tags.subfiles): New, TAGS files in $(SUBDIRS) entries (if any)
that must be included in the top-level TAGS file.
(tags-am): Use them, and simplify accordingly.
[ng] tags: drop support for pre-5.6 exuberant ctags
Exuberant Ctags before that version (release in 2006) could
fail to create TAGS files when no files are supplied, despite
any '--etags-include' option. This required the addition of
a workaround ...
* lib/am/tags.am (tags-am): ... here, which can now be removed.
* lib/am/tags.am (am__uniquify_input, am__define_uniq_tagged_files):
Remove, their role taken over by ...
(am.tags.files.uniq): ... this new (memoized) variable.
All rules adjusted.
(tags-am): Use $(CURDIR) instead of `pwd` to compute the absolute
path of the current working directory.
(GTAGS): Use $(abs_top_builddir) instead of `cd $(top_builddir) && pwd`
to compute the absolute path of the top-level build directory.
The best explanation for this move is given by excerpts from the
Automake manual itself:
Several years ago François Pinard pointed out several arguments
against this AM_MAINTAINER_MODE macro. Most of them relate to
insecurity. By removing dependencies you get non-dependable builds:
changes to sources files can have no effect on generated files and
this can be very confusing when unnoticed. He adds that security
shouldn't be reserved to maintainers (what '--enable-maintainer-mode'
suggests), on the contrary. If one user has to modify a Makefile.am,
then either Makefile.in should be updated or a error should be output
(this is what Automake uses the 'missing' script for) but the last
thing you want is that nothing happens and the user doesn't notice
it (which is exactly what happens when rebuild rules are disabled by
AM_MAINTAINER_MODE).
Jim Meyering, the inventor of the AM_MAINTAINER_MODE macro was swayed
by François's arguments, and got rid of AM_MAINTAINER_MODE in all of
his packages.
Since in Automake-NG we are breaking backward-compatibility in several
ways already, this is a good occasion to get rid of another obsolescent,
historical-reasons-only, more-dangerous-than-useful feature.
Admittedly, the manual went on saying:
Still many people continue to use AM_MAINTAINER_MODE, because it
helps them working on projects where all files are kept under
version control, and because missing isn't enough if you have the
wrong version of the tools.
But then, the right solutions for using lies not in the use of the
brittle AM_MAINTAINER_MODE macro; such solutions are indeed already
explained in another section of the manual (in the section "CVS and
generated files"):
In distributed development, developers are likely to have different
version of the maintainer tools installed. In this case rebuilds
triggered by timestamp lossage will lead to spurious changes to
generated files. There are some popular solutions to this:
- All developers should use the same versions, so that the rebuilt
files are identical to files in CVS. (This starts to be difficult
when each project you work on uses different versions).
- Or people use a script to fix the timestamp after a checkout (the
GCC folks have such a script).
The use of such a "timestamp-fixing" script is also suggested earlier
in the section, in the discussion about the merits and limits of the
'missing' script.
* NG-NEWS: Update.
* doc/automake-ng.texi: Likewise; among the other things ...
(maintainer-mode): ... rename this node ...
(maintainer tools): ... like this.
* m4/maintainer.m4: Delete.
* Makefile.am (dist_automake_ac_DATA): Delete.
* automake.in ($seen_maint_mode): Remove this global variable.
(scan_autoconf_trace): Don't trace 'AM_MAINTAINER_MODE'.
(read_am_file): Don't special-handle '@MAINT@' substitutions;
which were an anachronism anyway, according to pre-existing
comments.
(preprocess_file): Drop 'MAINTAINER-MODE' transform.
* lib/am/configure.am: Remove all uses of the %MAINTAINER-MODE%
transform.
* lib/am/remake-hdr.am: Likewise.
* lib/am/texi-vars.am: Likewise.
* lib/am/lex.am, lib/am/yacc.am: Likewise, and simplify dropping
the definition and use of (respectively) '$(am.lex.maybe-skip)'
and '$(am.yacc.maybe-skip)'.
* t/condlib.sh (configure.ac): Drop AM_MAINTAINER_MODE use.
* t/flavor.sh: Likewise, and drop '--enable-maintainer-mode'
from the './configure' invocation.
* t/lex-pr204.sh: Remove as obsolete.
* t/yacc-pr204.sh: Likewise.
* t/maintmode-configure-msg.sh: Likewise.
* t/mmode.sh: Likewise.
* t/mmodely.sh: Likewise.
* t/remake5.sh: Likewise.
* t/lex-nodist.sh: Fix header comments to account for some of
the deleted tests.
* t/yacc-nodist.sh: Likewise.
[ng] uninstall: refactor, more processing delegated to GNU make
* lib/am/header-vars.mk (am.chars.space, am.chars.tab): New variables,
defined respectively to a literal white space characters and a literal
tabulation character.
(am.util.whitespace-escape): New function, backslash-escape whitespace
characters in the given string.
(am.util.file-exists): New function, tell whether the given argument
is an existing file; it does so coping correctly with whitespaces and
wildcard metacharacters as well, to be usable with paths containing
references to $(DESTDIR).
(am.uninst.cmd.aux): Re-implement using the new $(am.util.file-exists)
function.
[ng] uninstall: reimplement various recipes using more GNU make features
This change likely introduces subtle semantic changes in corner cases
and tricky situation. Given the simplifications and improved uniformity
it offers, we consider that completely acceptable.
With this change, the test 't/instmany-python.sh' passes once again.
* lib/am/header-vars.mk (am.uninst.cmd): New private make function.
(am.uninst.cmd.aux): Likewise, used internally by the above (and
to be considered an implementation detail of it).
(am__uninstall_files_from_dir): Delete, no more needed.
* lib/am/data.am: Rewrite the uninstall recipe(s) to take advantage
of $(am.uninst.cmd).
* lib/am/libs.am: Likewise.
* lib/am/lisp.am: Likewise.
* lib/am/mans.am: Likewise.
* lib/am/python.am: Likewise.
* lib/am/progs.am: Likewise.
* lib/am/scripts.am: Likewise.
* lib/am/texinfos.am: Likewise (and also of other unrelated GNU make
features while we are at it).
[ng] refactor: remove all uses of $(am__nobase_strip{,_setup})
Prefer using GNU make built-ins $(patsubst) and $(notdir) instead.
This entails a partial or complete rewrites of several install and/or
uninstall rules.
This change doesn't offer any serious simplification, being just a
step in the general direction of moving more non-trivial processing
to GNU make. The change actually slows down some install/uninstall
rules, but leave the touched codebase simpler and more malleable by
future changes; performance improvements can be re-introduced later,
this time with more use of GNU make features rather than sed+awk
chicanery.
This change also breaks the test 't/instmany-python.sh'; no big
deal though, as that will be fixed again soon by further refactoring.
* lib/am/data.am: Rewritten some install/uninstall rules to avoid
using '$(am__nobase_strip)' and '$(am__nobase_strip_setup)'.
* lib/am/libs.am: Likewise.
* lib/am/lisp.am: Likewise.
* lib/am/python.am: Likewise.
* lib/am/scripts.am: Likewise. Also drop some performance optimization
that, albeit useful and legitimate, were making the code too much
complicated to work on.
(am__nobase_strip): Remove, no more used.
(am__nobase_strip_setup): Likewise, its only remaining use inlined ...
(am__nobase_list): ... here.
This is mostly useful for Automake-NG, that is heavily overhauling the
generated Makefiles and thus is prone to break grepping checks (which
can sometimes end up causing false negatives in the testsuite, sadly).
But this is not a reason not to strengthen the test for mainline
Automake as well.
* t/info.sh: This: it tried to operate by checking the contents of the
variable '$(INFOS)', but that is not even defined (and probably has been
obsolete for quite a long time). Since other tests already do thorough
testing of the Texinfo support, just remove this test.
* t/list-of-tests.mk: Adjust.
* t/scripts.sh: This: it used to check that the 'AC_PROG_INSTALL' macro
was not uselessly required, but today that macro is AC_REQUIRE'd by
'AM_INIT_AUTOMAKE' anyway, so that the test is no more significant.
* t/list-of-tests.mk: Adjust.
[ng] refactor: remove all uses of '$(am__strip_dir)'
Prefer using GNU make built-in '$(notdir)' instead. This change doesn't
offer any serious simplification, but is just a step in the general
direction of moving more non-trivial processing to GNU make.
* lib/am/lib.am: Rewritten some install/uninstall rules to avoid
using '$(am__strip_dir)'.
* lib/am/lisp.am: Likewise.
* lib/am/ltlib.am: Likewise.
* lib/am/python.am: Likewise.
* lib/am/texinfos.am: Likewise.
* lib/am/header-vars.mk (am__strip_dir): Remove.
[ng] refactor: merge inst-vars.am into header-vars.mk
This will simplify possible future refactorings. Given the small size
of 'inst-vars.am', and the fact that the content of a verbatim-included
makefile fragment is included in the distribution tarball only once,
this change doesn't increase the size of distribution tarballs in any
appreciable way, even if the variables once defined in 'inst-vars.am'
aren't really needed.
* lib/am/inst-vars.am: Remove, merged ...
* lib/am/header-vars.mk: ... in here, with all '##' comments turned
into '#' comments, and (few of them) slightly improved with the
addition of "FIXME" remarks.
* Makefile.am (dist_am_DATA): Adjust.
* lib/am/data.am: Include the 'inst-vars.am' file explicitly no more.
* lib/am/libs.am:: Likewise.
* lib/am/lisp.am:: Likewise.
* lib/am/ltlib.am:: Likewise.
* lib/am/mans.am:: Likewise.
* lib/am/python.am:: Likewise.
* lib/am/scripts.am:: Likewise.
* lib/am/texinfos.am:: Likewise.
[ng] cleanup: remove few VPATH rewrite workarounds
They are not needed by GNU make, which performs no implicit VPATH
rewrites in its recipes.
* lib/am/lisp.am (install-%DIR%LISP): No need to "correct" possible
VPATH rewrites: GNU makes doesn't do them. Accordingly, ...
* lib/am/inst-vars.am (am__vpath_adj_setup, am__vpath_adj): ... these
two variables are no more needed: remove them.
* master: (23 commits)
tests: avoid spurious failures with older Texinfo
tests: avoid tons of spurious failures on NetBSD
runtest: avoid spurious failures on NetBSD
news: dependency tracking for Portland Group Compilers is now supported
tests: cater to OpenSolaris 'zip'
tests: fix a spurious XPASS on OpenIndiana
tests: avoid spurious failure of 't/vala-vapi.sh' on OpenIndiana
tests: avoid spurious failure of 't/uninstall-fail.sh' on OpenIndiana
tests: reimplement wrappers for automake and aclocal in perl
tests: work around a ksh bug w.r.t. ${1+"$@"}
news: document all the recent elisp-related changes and improvements
coverage: byte-compiling elisp files in different subdirectories
elisp: honour AM_ELCFLAFS and ELCFLAGS in byte-compilation
elisp: --batch implies -q, remove -q
elisp: support elisp files in subdirectories properly
elisp: simplify suffix rules using emacs '-L' option
elisp: no need to "absolutize" $(srcdir) and $(builddir) ...
elisp: prefer $(builddir) files over $(srcdir) ones
elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)
coverage: elisp path contains $(srcdir) and $(builddir)
...
+ Extra non-trivial edits:
* lib/am/lisp.am (am.clean.normal.f): Add 'elc-stamp' no more.
* maint:
tests: avoid spurious failures with older Texinfo
tests: avoid tons of spurious failures on NetBSD
runtest: avoid spurious failures on NetBSD
news: dependency tracking for Portland Group Compilers is now supported
* t/distcheck-override-infodir.sh (main.texi): Add explicit calls to
'@dircategory' and '@direntry', to ensure a 'dir' file will be created
also by 'install-info' coming with Texinfo 4.8.
* t/ax/am-test-lib.sh (process_requirements): Set the '$am_tool' variable
to the empty string before trying to unset it; otherwise, we might be
attempting to unset an already-unset variable, which (together with the
presence of the 'errexit' shell flag) causes spurious failures at least
with the /bin/sh shell from NetBSD 5.1. This was actually causing the
great majority of the Automake tests (all those not using a "required=..."
declaration) to fail spuriously on that platform!
* runtest.in: Use ${1+"$@"} rather than simply "$@", because the 'set -u'
setting used in the script causes the latter to trigger a spurious error
with the NetBSD 5.1 /bin/sh ("./runtest: @: parameter not set") if there
are no arguments to the test.
* elisp-work:
news: document all the recent elisp-related changes and improvements
coverage: byte-compiling elisp files in different subdirectories
elisp: honour AM_ELCFLAFS and ELCFLAGS in byte-compilation
elisp: --batch implies -q, remove -q
elisp: support elisp files in subdirectories properly
elisp: simplify suffix rules using emacs '-L' option
elisp: no need to "absolutize" $(srcdir) and $(builddir) ...
elisp: prefer $(builddir) files over $(srcdir) ones
elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)
coverage: elisp path contains $(srcdir) and $(builddir)
coverage: emacs lisp files in subdirectories
* t/dist-formats.tap: Here: OpenSolaris zip do not accept the
'--version' option, but accept the '-v' one with a similar
meaning (if no further arguments are given).
* maint:
tests: fix a spurious XPASS on OpenIndiana
tests: avoid spurious failure of 't/vala-vapi.sh' on OpenIndiana
tests: avoid spurious failure of 't/uninstall-fail.sh' on OpenIndiana
tests: reimplement wrappers for automake and aclocal in perl
tests: work around a ksh bug w.r.t. ${1+"$@"}
depcomp: style changes to Portland Group Compilers support
depcomp: initial support for Portland Group Compilers
* t/instspc.tap: Here, by isolating the $(DESTDIR) used by runs with
different "problematic strings" to prevent them to unduly interfering
with each other. With this, the Automake testsuite finally run cleanly
on the OpenIndiana and Solaris 10 systems I have access to.
tests: avoid spurious failure of 't/vala-vapi.sh' on OpenIndiana
* t/vala-vapi.sh: Use 'printf', not 'echo', to print strings containing
substrings like '\n', that can be interpreted like escape strings. That
because the /bin/sh and the /bin/bash shell from OpenIndiana actually
interpret them that way:
$ /bin/sh -c 'echo "foo\nbar"'
foo
bar
$ /bin/bash -c 'echo "foo\nbar"'
foo
bar
tests: avoid spurious failure of 't/uninstall-fail.sh' on OpenIndiana
On current OpenIndiana (based on what once was OpenSolaris 11), the shell
/bin/sh (which, differently from what happens on Solaris, is a true POSIX
shell, thus worthy of consideration) somehow manages to "eat" the
error message from 'rm' when that fails to remove a file due to lacking
permission on the parent directory:
That is probably due to an improper optimization, that is, the shell tries
to be smart and remove the file itself instead of invoking 'rm', but fails
spectacularly in the attempt.
* t/uninstall-fail.sh: The just-described bug was causing a spurious
failure in this test case. Cater to thus situation, by relaxing the
test when a faulty shell is detected. And while at it, fix and improve
an unrelated comment.
tests: reimplement wrappers for automake and aclocal in perl
This will allow us to avoid one extra shell invocation per automake
and aclocal invocation in our testsuite, and, more importantly, will
allow us not to worry about potential shell portability issues, at
least in those wrappers. For an example of such a portability issue,
refer to the recent commit v1.12.2-80-g65dadf6 "tests: work around a
ksh bug w.r.t. ${1+"$@"}".
* t/wrap/automake.in, t/wrap/aclocal.in: Rewritten in perl.
Fixes automake bug#10898. See also the older (much older) thread:
<http://lists.gnu.org/archive/html/automake-patches/2009-12/msg00036.html>
At least the AT&T and OpenSolaris versions of the Korn shell, as well
as the /bin/sh from OpenIndiana 11, have a strange bug regarding the
expansion of ${1+"$@"}: when exactly *one empty* argument is passed to
a script run by one of this shells, inside that script ${1+"$@"} will
expand to *nothing*, rather than to to the single empty string, as
one would expect (OTOH, $# will correctly expand to 1). This buggy
behaviour was causing a spurious failure in our testsuite (test 6 in
't/automake-cmdline.tap'). Work around it.
coverage: byte-compiling elisp files in different subdirectories
Where a '.el' file in a subdirectory might require a '.el' file in
another one. This does not work out of the box, but can be made to
work with a judicious use of $(AM_ELCFLAGS) (just introduced in the
previous commit).
* t/lisp-subdir-mix.sh: New test.
* t/list-of-tests.mk: Add it.
Instead of placing the verbatim makefile fragments in the directory
'$(top_srcdir)/.mk', we place them in '$(build-aux)/am-ng', where
'$(build-aux)' is the directory specified by AC_CONFIG_AUX_DIR, or,
if that is not explicitly specified, the directory automatically
determined by automake to help the auxiliary scripts and files (that
typically being '$(top_srcdir)').
general: include verbatim makefile fragments in output Makefiles
Instead of copying their contents in each output Makefile.
* automake.in (verbatim): Instead of copying the given Makefile fragment
in the output makefile, copy it in the '.mk' subdirectory of the top-level
source directory (i.e., the one automake is being run into). And return
a proper "include" directive that will allow GNU make to include that
fragment in the generated Makefile at make runtime.
* lib/am/distdir.am: Distribute the '.mk' subdirectory of the top-level
source directory, with the help of ...
(am.dist.mk-files): ... this new internal variable.
* .gitignore: Add the '.mk' directory.
* Makefile.am (amhello_configury): Likewise.
* t/all2.sh: Adjust.
* t/ax/depcomp.sh: Likewise.
* t/ax/tap-setup.sh: Likewise.
* t/check.sh: Likewise.
* t/distdir.sh: Likewise.
* t/installdir.sh: Likewise.
* t/noinst.sh: Likewise.
* t/phony.sh: Likewise.
* t/spell.sh: Likewise.
* t/spell2.sh: Likewise.
* t/conflnk2.sh: Adjust, and refactor a bit while we are at it.
* t/serial-tests.sh: Likewise (greatly simplifying it in the process).
* t/txinfo-rules-once.sh: Remove: its grepping tests has been rendered
almost all obsolete, and it would be to time-consuming to try to update
them.
* t/dejagnu.sh: Remove as obsolete.
* t/instexec.sh: Likewise.
* t/clean.sh: Likewise.
This formulation was supposed to help avoiding extra forks (due to the
leading "test -d" check), but it didn't actually do so. In fact, in the
situations '$(am__mkdir)' was most used (typically indirectly, through
other private variables like '$(am__ensure_target_dir_exists)') the
Makefile had already determined by other means (e.g., tricky uses of the
'$(wildcard)' built-in) that the relevant directory didn't exist and
thus *had* to be created, so the fork of $(MKDIR_P) has to happen anyway.
In fact, the use of '$(am__mkdir)' often ended up causing *more forks*,
because it eventually expanded to recipes like:
target: recipe
test -d non-existent || $(MKDIR_P) non-existent
... rest of the recipe ...
forcing make to spawn a shell to execute the first line of the recipe --
which, containing the shell metacharacters "||", couldn't be spawned
directly -- shell which in turn had to spawn $(MKDIR_P).
Whereas with a simpler
target: recipe
$(MKDIR_P) non-existent
... rest of the recipe ...
make would span $(MKDIR_P) directly itself, thus saving a shell execution
-- and speeding up the recipe.
* lib/am/header-vars.mk (am__mkdir): Remove.
(am__ensure_dir_exists): Simply use $(MKDIR_P) directly.
Makes clear and manifest the fact that they are not parsed like the
other '*.am' files are (for variable and rule definitions, processing
of Automake conditionals, etc.), rather included almost verbatim (the
"almost" being the stripping of '##'-comments).
* automake.in (verbatim): Expect a suffix of '.mk', not '.am'.
* lib/am/texibuild.am: Rename ...
* lib/am/texibuild.mk: ... like this.
* lib/am/clean.am: Rename ...
* lib/am/clean.mk: ... like this.
* lib/am/check-typos.am: Rename ...
* lib/am/check-typos.mk: ... like this.
* lib/am/color-tests.am: Rename ...
* lib/am/color-tests.mk: ... like this.
* lib/am/parallel-tests.am: Rename ...
* lib/am/parallel-tests.mk: ... like this.
* lib/am/serial-tests.am: Rename ...
* lib/am/serial-tests.mk: ... like this.
* lib/am/header-vars.am: Rename ...
* lib/am/header-vars.mk: ... like this.
* lib/am/am-dir.am: Rename ...
* lib/am/am-dir.mk: ... like this.
* lib/am/common-targets.am: Rename ...
* lib/am/common-targets.mk: ... like this.
* Makefile.am (dist_am_DATA): Adjust.
* t/am-xargs-map.sh: Likewise.
* t/ensure-dir-exists.sh: Likewise.
* t/internals.tap: Likewise.
* t/memoize.tap: Likewise.
* t/verbatim.sh: Likewise.
[ng] clean: prefer internal variables over automake-time %TRANSFORMS%
This will be especially useful in the next change.
* automake.in (handle_clean): Define several new private make variables
'am.clean.*.f.auto' and 'am.clean.*.d.auto'. Drop the %TRANSFORMS% when
processing ...
(lib/am/clean.am): ... this file, which now uses the new internal vars.
* syntax-checks.mk (typos-for-clean, sc_variable_typos_rules): Delete.
The new names make it both more difficult to have typos and more difficult
to detect them automatically, so keeping these maintainer checks is no
more worth the hassle.
[ng] clean: simplify code for removal of '.am' dir
* lib/am/am-dir.am (am--distclean-amdir): Delete this phony rule and
the 'distclean-am' dependency on it ...
(am__distclean_dirs): ... simply append $(am.dir) to this instead.
[ng] automake: remove support for threaded execution
Why are we removing such a nice feature, especially in a world where
multicore systems are becoming the norm?
First, that feature adds a lot of complexity to the Automake script,
which might get in the way of future refactorings. And the Automake-NG
fork is about refactorings and cleanups at least as much as about new
features and better GNU make integration.
Also, the performance enhancements offered by threaded Automake seem
to be fairly limited:
<http://lists.gnu.org/archive/html/automake/2009-11/msg00004.html>
albeit admittedly not excessively so:
<http://www.open-mpi.org/community/lists/devel/2010/09/8524.php>
In addition, we should really be pushing peoples towards non-recursive
build systems -- refer to Peter Miller's article "Recursive Make
Considered Harmful" <http://miller.emu.id.au/pmiller/books/rmch/>.
In such a non-recursive setup, there is just just one 'Makefile.am',
and thus little point in trying to launch a thread for each
'Makefile.am'.
In the end, however, the consideration that tipped the balance in favor
of this change is that we want to reach a point, during the yet-to-come
maturity of Automake-NG, where the 'automake' script will be just a thin
layer around the provided helper scripts and makefile fragments (with
maybe a *small* smattering of preprocessing), as well as around autom4te
(for the proper parsing of configure.ac). At such a point, a threaded
execution would bring no real benefit.
* NG-NEWS: Update.
* doc/automake-ng.texi, NG-NEWS: Likewise.
* configure.ac: Don't check for 'ithreads' support in perl.
Drop AC_SUBST 'PERL_THREADS'.
* bootstrap.sh (PERL_THREADS): Don't define.
(dosubst): Don't substitute it.
* lib/Automake/Config.in ($perl_threads): Define no more.
(@EXPORT): Drop it.
* aclocal.in ($perl_threads): Remove, no more needed.
* automake.in (BEGIN) [$perl_threads]: Don't require nor import
the 'threads' and 'Thread::Queue' modules.
(QUEUE_MESSAGE, QUEUE_CONF_FILE, QUEUE_LOCATION, QUEUE_STRING):
Delete constants.
($required_conf_file_queue): Delete variable.
($nthreads): Likewise, and thus ...
(get_number_of_threads): ... delete this function, whose only
purpose was to initialize that variable.
(handle_makefiles_serial): Delete, its body inlined in the main
code.
(require_file_internal): Don't take the '$QUEUE' argument, nor
handle threading/serialization calling back ...
(queue_required_file_check_or_copy): ... this function, which
has thus been removed.
(require_libsource_with_macro): Adjust 'require_file_internal'
call to new signature.
(require_conf_file): Likewise, in the process dropping any
handling of threading/serialization.
(handle_makefiles_threaded): This is no more called anywhere,
so delete it, together with ...
(require_queued_file_check_or_copy): ... this, which has in
that its only caller.
* lib/Automake/Location.pm (serialize, deserialize): Delete
as unused.
* lib/Automake/Channels.pm (setup_channel_queue,
pop_channel_queue): Likewise.
(@EXPORT): Adjust.
(BEGIN) [$perl_threads]: Don't require nor import 'threads'.
(%_default_options): Remove 'ordered', 'queue' and 'queue_key'
keys, that were only required for serialization during threaded
Automake.
(_merge_options, _print_message): No need to handle those
options.
Adjust creation of channels 'automake', 'verb' and 'fatal'.
(_enqueue, _dequeue): Delete as unused.
(msg): Adjust a comment.
(verb): Don't try to display informations about the current
thread.
* lib/Automake/DisjConditions.pm (CLONE): Delete, no more
needed.
* t/ax/am-test-lib.sh (require_tool): Drop handing of
requirement 'perl-threads'; it is not used by any test now.
* t/parallel-am.sh: Remove as obsolete.
* t/parallel-am2.sh: Likewise.
* t/parallel-am3.sh: Likewise.
* t/pm/Condition-t.pl: Likewise.
* t/pm/DisjConditions-t.pl: Likewise.
* t/werror3.sh: Don't test with AUTOMAKE_JOBS=2.
* Makefile.am (check-coverage-run, recheck-coverage-run): Don't
export 'WANT_NO_THREADS' to "yes", nor unset 'AUTOMAKE_JOBS'.
[ng] cleanup: remove on almost-unused global vars: am_relative_dir
* automake.in ($am_relative_dir): Delete, it was only used once ...
(generate_makefile): ... in here, so it's simpler to inline its
expansion.
(initialize_per_input): Don't reset the deleted variable.
[ng] cleanup: remove on almost-unused global vars: topsrcdir
* automake.in ($topsrcdir): Delete, it was only used once ...
(handle_LIBOBJS_or_ALLOCA): ... in here, so it's simpler to inline
its expansion. Improve formatting of immediately surrounding code
a little while we are at it.
(initialize_per_input): Don't reset the deleted variable.
[ng] cleanup: remove two almost-unused global vars: {am,in}_file_name
* automake.in ($am_file_name, $in_file_name): Delete these, which were
used only in the 'read_main_am_file' subroutine; instead ...
(read_main_am_file): ... modify it to only work from the '$makefile_am'
argument (which it was already receiving), and the new '$makefile_in'
argument, which is now passed to it ...
(generate_makefile): ... from here.
(initialize_per_input): Don't reset the two deleted variables anymore.
[ng] general: new internal vars to hold path of current Makefile{,.in,.am}
This is preferable to having to use the '%MAKEFILE%', '%MAKEFILE-IN%'
and '%MAKEFILE-AM%' transforms in several places, and will enable us
to do more sweeping refactorings in the future.
* automake.in (generate_makefile): Define new private make variables:
- am.relpath.makefile.am
- am.relpath.makefile.in
- am.relpath.makefile
* automake.in (handle_configure, handle_clean, generate_makefile),
lib/am/configure.am, lib/am/check-typos.am, lib/am/clean.am: Adjust
throughout to use them instead of the corresponding transforms.
* t/remake.sh: Adjust and extend grepping checks.
[ng] refactor: make '&verbatim' polymorphic in its return value
* automake.in (verbatim): If used in empty context, continue to act
as before, and append the read makefile fragment to '$output_verbatim'.
But if used in scalar or list context, return it instead.
[ng] automake: can copy makefile fragments really verbatim
This will allow us to actually put such fragments in distributed
files, and then include them *at make runtime*, instead of copying
their contents in every single makefile (as is done now, a legacy
from mainline Automake).
* automake.in (verbatim): New function, will copy the given file
"verbatim" (excluding removal of '##' comments) in the output
Makefile.
(handle_tests): Use 'verbatim', not 'almost_verbatim', to include
files 'color-tests.am', 'serial-tests.am' and 'parallel-tests.am'.
(handle_texinfo): Likewise, for 'texibuild.am'.
(generate_makefile): Likewise, for 'common-targets.am' and
'am-dir.am'.
[ng] refactor: move hack for libtool installs from automake to install.am
* automake.in (generate_makefile): Move the hack necessary to make the
installation of libtool libraries and binaries dependent on them work
"on degenerate systems even with make -j" (according to the comments of
the original authors :-) from here ...
* lib/am/install.am: ... to here, with improved comments.
For the origin of the hack we are moving around here, refer to commit bd4a1d5 of 2000-10-19, "* automake.in (handle_merge_targets): Allow
parallel install with forced relink".
[ng] automake: merge '&handle_tests_dejagnu' into '&handle_tests'
* automake.in (handle_tests_dejagnu): This is just a trivial
one-liner now, so merge it ...
(handle_tests): ... in here. And remove a redundant heading
comment.
[ng] all: deps for the 'all' target listed in '$(am.all.targets)'
* automake.in (handle_all_and_check): Drop transform 'ALL-DEPS' when
processing the 'all-target.am' file.
(generate_makefile): Define '$(am.all.targets)' as the list of
dependencies for the 'all' target.
* lib/am/all-target.am: Use it instead of the transform '%ALL-DEPS%'.
* t/java.sh: Relax grepping checks to avoid spurious failures.
* t/amopts-variable-expansion.sh: Likewise.
* lib/am/all-target.am: Use '$(am.config-hdr.local)' directly,
instead of the '%LOCAL-HEADERS%' transform.
* automake.in (handle_all_and_check): Drop that transform.
This is a pure refactoring with no semantic changes intended.
* automake.in (handle_all_and_check, handle_tags): Do not re-calculate
the list of "local" input or output header files (specified by
AC_CONFIG_HEADERS in configure.ac); that is already saved in the internal
make variables '$(am.config-hdr.local)' and '$(am.config-hdr.local.in)'.
Simply use these variables instead.
[ng] vars: separate config headers in two vars (local and non-local ones)
Where the "local" are those which are in the same subdirectory of the
Makefile.am being currently processed, and the "non-local" ones are
not (and thus need to be prepended with $(top_builddir)).
* automake.in (handle_config_headers): Define two new make variables
'am.config-hdr.local' and 'am.config-hdr.non-local'. Accordingly,
define 'AM_CONFIG_HEADERS' as the union of them.
[ng] automake: move processing of config-header rules in its own function
This is a pure refactoring with no semantic changes intended. It will
only be useful for future changes.
* automake.in (handle_configure): Move definition of $(AM_CONF_HEADERS)
from here ...
(handle_config_headers): ... to this new function, which will also ensure
that the $(AM_CONFIG_HEADERS) will always be defined (albeit possibly to
an empty value).
(generate_makefile): Call the new variable.
[ng] check: avoid extra recursive make invocations
After this change, "make check" will not cause any recursive make
invocation by default (unless there are $(SUBDIRS) to descend into, of
course). One little price to pay is that the targets 'check-TESTS',
'check-DEJAGNU' and 'check-local' will always be defined (being dummy
by default). The other one is that the old semantics are not 100%
preserved, so corner cases that worked in mainline Automake might not
work anymore out-of-the-box with Automake-NG, thus requiring the user
to make his dependency declarations more complete or precises.
We believe these prices are well worth paying.
* lib/am/check-target.am: Rewrite 'check-am' handling to avoid the
extra make recursion(s). A side effect of this is that the transform
'%CHECK-DEPS%' is no more needed. Accordingly ...
* automake.in (@check_tests): ... drop definition and updating of this
variable throughout, and ...
(handle_all_and_check): ... the definition of the '%CHECK-TESTS%'
transform when processing the 'check-target.am' file.
* t/local-targets.sh: Adjust to avoid spurious failures.
* t/checkall.sh: Remove, it's quite obsolete (and has just started
to spuriously fail).
[ng] check: deps for 'check' target listed in '$(am.test-suite.deps)'
* automake.in (handle_all_and_check, handle_tests): Drop transform
'CHECK-DEPS' when processing (respectively) the files 'check-target.am'
and 'parallel-tests.am'.
(generate_makefile): Define '$(am.test-suite.deps)' as the list of
dependencies for the 'check' target.
* lib/am/parallel-tests.am, lib/am/check-target.am: Use it instead
of the transform '%CHECK-DEPS%'.
* Makefile.am (t/ax/test-defs.sh): Ensure the 't/ax' directory exists,
before trying to create 'test-defs.sh' in there. This is required in
VPATH builds.