[ng] texinfo: pattern rules with empty suffixes are OK
So we can remove a workaround required by Solaris make from our
texinfo rules.
* automake.in (output_texinfo_build_rules): Don't define the boolean
'$generic_info' anymore. Drop the 'SOURCE_INFO' and 'GENERIC_INFO'
transforms when processing the 'texibuild.am' file. Remove obsolete
comments, and adjust some of the remaining ones.
* lib/am/texibuild.am: Adjust by always assuming that '?GENERIC_INFO?'
is true.
* t/txinfo3.sh: Adjust and extend.
[ng] subdirs: use static pattern rules to define *-recursive targets
* lib/am/subdirs.am ($(RECURSIVE_TARGETS), $(RECURSIVE_CLEAN_TARGETS)):
Rewrite as static pattern rules. This will also simplify their recipes,
avoid extra processing by the shell, and shave off a couple of forks.
[ng] subdirs: prefer "make -C dir" over "cd dir && make"
* lib/am/subdirs.am ($(RECURSIVE_TARGETS), $(RECURSIVE_CLEAN_TARGETS)):
Prefer "$(MAKE) -C $$dir ..." over "($(am__cd) $$dir && $(MAKE) ...".
This allows us to remove a subshell invocation.
* master:
automake: stop supporting "%KEY?iftrue:iffalse%" transforms
am: stop using "%KEY:iffalse?iftrue%" transforms
tests: minor reorganization of few tests
fixup: adjust t/list-of-tests.mk for renamed/added tests
subdirs: enhance coverage, tweak and rename few tests
sync: update files from upstream with "make fetch"
py-compile: consistently quote 'like this', not `like this'.
docs: recursive make considered harmful
docs: clean rules are not run in reverse order of build rules anymore
silent: new $(AM_V_P) variable, tell if we're running in silent mode
refactor: silent rules handling (a little)
refactor: &define_verbose_var: accept a third optional argument
+ Extra non-trivial edits:
* t/dir-named-obj-is-bad.sh, t/sourcefile-in-subdir.sh: Delete, it's how
the old (and in Automake-NG obsolete and removed) tests 't/subdir3.sh'
and 't/subdir7.sh' have been respectively renamed in mainline Automake.
* t/silent6.sh: Don't disable the 'portability-recursive' warnings, they
are not anymore used nor supported by Automake-NG.
* automake.in: Adjust calls to subroutines '&Automake::Variable::define'
and '&define_variable' to the different Automake-NG APIs and signature.
* maint:
tests: minor reorganization of few tests
fixup: adjust t/list-of-tests.mk for renamed/added tests
subdirs: enhance coverage, tweak and rename few tests
sync: update files from upstream with "make fetch"
py-compile: consistently quote 'like this', not `like this'.
docs: recursive make considered harmful
docs: clean rules are not run in reverse order of build rules anymore
silent: new $(AM_V_P) variable, tell if we're running in silent mode
refactor: silent rules handling (a little)
refactor: &define_verbose_var: accept a third optional argument
+ Extra non-trivial edits:
These are due to the fact that support for silent rules is enabled
unconditionally these days (since commit 'v1.12-34-g14141f2' of
2012-05-01, "silent rules: support for them is always active now").
* automake.in: In the new silent related code, do not ever check
whether the 'silent-rules' option is active; just assume support
for silent rules is enabled.
* t/silent-obsolescent-warns.sh: Remove as obsolete.
* t/list-of-tests.mk: Adjust.
* silent-custom:
silent: new $(AM_V_P) variable, tell if we're running in silent mode
refactor: silent rules handling (a little)
refactor: &define_verbose_var: accept a third optional argument
[ng] all, check, install: move more processing at make runtime
A welcome collateral effect of this change is that now the 'check-local',
'all-local' and 'installdirs-local' targets can also be defined in
wrapper Makefiles or in Makefile fragments only included at make (not
automake) runtime, without their definition ever having to be seen by
Automake.
* lib/am/all-target.am: New file, implementing the 'all' target.
* lib/am/check-target.am: New file, implementing the 'check' target.
* automake.in (handle_install): Adjust by processing it simply with
'&preprocess_file', and placing its content in '$output_verbatim'
rather than in '$output_rules'.
(handle_all, )
* lib/am/install.am: Largely rewritten to rely on GNU make runtime
capabilities rather than on automake-runtime preprocessing.
* automake.in (handle_install): Adjust by processing it simply with
'&preprocess_file', and placing its content in '$output_verbatim'
rather than in '$output_rules'.
* automake.in (handle_all, do_check_merge_target): Merged into ...
(handle_all_and_check): ... this, and largely rewritten to rely
on the new 'lib/am/{all,check}-target.am' files.
(generate_makefile): Adjust.
* Makefile.am (dist_am_DATA): Add the new '.am' files.
(XFAIL_TESTS): Add test 't/override-suggest-local.sh', that has been
broken by this change (we consider this an acceptable trade-off).
* doc/automake-ng.texi: Remove reference to removed test.
* lib/am/header-vars.am: Sanitize $(SUBDIRS), by setting it to the
empty value if it is not set, but not from the Makefile not any
command-line override.
* t/built-sources-check.sh: Remove obsolete grepping checks.
* t/remake-all-1.sh: Likewise.
* t/bsource.sh: Adjust and enhance.
* t/check.sh: Remove as basically obsolete.
* t/check2.sh: Relax grepping checks.
* t/doc-parsing-buglets-tabs.sh: Remove as too brittle.
* t/local-targets.sh: New test.
* t/tap-diagnostic.sh: Fix grepping of "make check" stdout to avoid
spurious errors.
* t/phony.sh: Tweak, to avoid spurious failure.
* t/vartar.sh: Likewise.
This will be useful to better check the correctness of later changes.
* t/built-sources.sh: New test, checks basic functionality for
BUILT_SOURCES.
* t/built-sources.sh: New test, checks basic interaction between
BUILT_SOURCES and Automake conditionals.
* t/check3.sh: Split this out ...
* t/built-sources-check.sh, t/built-sources-install.sh: ... into
these tests, to offer more granularity and make the purpose of the
tests immediately clear from their names.
* t/subdirbuiltsources.sh: Rename this ...
* t/built-sources-subdir.sh: ... to this, for consistency. Since
we are at it, fix a couple of typos and remove redundant stuff.
And the similar "reduced forms" "%KEY:iffalse%" and "%KEY?iftrue%"
as well.
They are convoluted, never used (after the previous change), and will
get in the way in the Automake-NG branch, where we'll soon want to use
GNU make static pattern rules in our internal '*.am' fragments.
* automake.in (preprocess_file, transform): Simplify not to support
those transform patterns.
And the similar "reduced forms" "%KEY:iffalse%" and "%KEY?iftrue%"
as well.
They are harder to grasp, can be easily reformulated in function of
other "plainer" transforms ("?KEY?" and "?!KEY?"), and we'll remove
support for them anyway in a later change.
* lib/am/data.am, lib/am/libs.am, lib/am/lisp.am, lib/am/ltlib.am,
lib/am/progs.am, lib/am/python.am, lib/am/scripts.am: Adjusted not
to rely on those kinds of transforms.
In the documentation, we shouldn't confuse "packages using subdirectories"
with "packages using recursive make invocations". A package can have a
careful organization in subdirectories, make no (or almost no) use of make
recursion (examples of such packages are GNU bison, GNU cppi, and Automake
itself).
In fact, make recursion should be used as seldom as possible, because it
makes the build system more brittle and dependency declarations less
faithful. See Peter Miller's article "Recursive Make Considered Harmful"
for more a more in-depth discussion:
http://miller.emu.id.au/pmiller/books/rmch/
* doc/automake.texi (Directories): Clarify how a build system based on
make recursion does. Observe that such a system, albeit being very
widespread, has its own issues and drawbacks, and that one can have a
non-recursive setup also for projects using complex directory layout.
(Recursing subdirectories): Speak of "packages that use make recursion"
rather than of "packages with subdirectories".
[ng]: tests: don't check whether $MAKE is GNU make -- of course it is
Revealed by "make maintcheck".
* t/subobj-clean-pr10697.sh: Don't call 'using_gmake' to determine
whether $MAKE is GNU make, and just assume GNU make semantics for
automatic Makefile rebuilding.
* t/subobj-clean-lt-pr10697.sh: Likewise.
* master:
maintcheck: fix failures, both real and spurious
subdir tests: avoid an use of "make -j4", for portability
tests: avoid failure due to libtool quirks in C++ demo test
tests: fix spurious failures due to missing '$sleep'
subdirs: unify rules for "cleaning" and "normal" recursive targets
tests: add a "demo" test on C support
tests: look for '.lo' rather than '.o' object when using Libtool with C++
cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
maint: grammar fixes: s/all these/all of these/
subdir-objects: improve "make mostlyclean" efficiency and flexibility
* maint:
maintcheck: fix failures, both real and spurious
subdir tests: avoid an use of "make -j4", for portability
tests: avoid failure due to libtool quirks in C++ demo test
tests: fix spurious failures due to missing '$sleep'
subdirs: unify rules for "cleaning" and "normal" recursive targets
tests: add a "demo" test on C support
tests: look for '.lo' rather than '.o' object when using Libtool with C++
cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
maint: grammar fixes: s/all these/all of these/
subdir-objects: improve "make mostlyclean" efficiency and flexibility
* syntax-checks.mk (sc_rm_minus_f): Whitelist the
't/subobj-clean*-pr10697.sh' tests.
* t/subobj-clean-pr10697.sh: When redefining PATH,
use '$PATH_SEPARATOR', not hard-coded ':'.
* t/subobj-clean-lt-pr10697.sh: Likewise.
subdir tests: avoid an use of "make -j4", for portability
Otherwise, a spurious failure with Solaris CCS make can be triggered.
The coverage is not actually reduced, since the code path is still
covered when one runs the testsuite with AM_TESTSUITE_MAKE="make -jN"
(as should be done periodically).
tests: avoid failure due to libtool quirks in C++ demo test
Revealed by failures on NetBSD 5.1.
* t/cxx-lt-demo.sh: In "make distcheck" invocation, don't define 'CC'
to "false", as that value would be exported and passed to the child
./configure invocation, and some configure checks generated by libtool
autoconf macros can still require a C preprocessor even for packages
using only C++, and bail out if it's not found. The problem was not
apparent on Solaris and GNU/Linux because those systems have a
'/lib/cpp' program, and configure detected and used that as a fallback
C preprocessor.
tests: fix spurious failures due to missing '$sleep'
Revealed by failures on NetBSD 5.1.
* t/subobj-clean-pr10697.sh: Call '$sleep' before modifying the
files that should trigger an automatic remake.
* t/subobj-clean-lt-pr10697.sh: Likewise.
Merge branches 'subdirs-simplify' and 'subdir-objects-pr10697' into maint
* subdirs-simplify:
subdirs: unify rules for "cleaning" and "normal" recursive targets
tests: add a "demo" test on C support
* subdir-objects-pr10697:
subdir-objects: improve "make mostlyclean" efficiency and flexibility
tests: look for '.lo' rather than '.o' object when using Libtool with C++
cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
subdirs: unify rules for "cleaning" and "normal" recursive targets
Before this change, the recursive invocation of cleaning targets in
the $(SUBDIRS) where done in inverse order, i.e., starting from the
last $(SUBDIRS) entry and proceeding towards the first. According
to the code comments, this was done ...
... in an attempt to alleviate a problem that can happen when
dependencies are enabled. In this case, the .P file in one
directory can depend on some automatically generated header
in an earlier directory. Since the dependencies are required
before any target is examined, make bombs.
But this comment does not apply anymore to the current implementation
of automatic dependency tracking: the '.Po' and '.Plo' files does not
depend on any C header or source file, ever!
So it seems that the distinction between "normal" and "cleaning"
recursive targets is a stale leftover of an older implementation of
the automatic dependency tracking. In fact, the Automake History
manual seems to confirm this suspect; the section "First Take on
Dependency Tracking" reads:
Because each .P file was a dependency of Makefile, this meant
that dependency tracking was done eagerly by make. For instance,
"make clean" would cause all the dependency files to be updated,
and then immediately removed. This eagerness also caused problems
with some configurations; if a certain source file could not be
compiled on a given architecture for some reason, dependency
tracking would fail, aborting the entire build.
and the following section "Dependencies As Side Effects" reads:
In this approach, the .P files were included using the -include
command, which let us create these files lazily. This avoided
the "make clean" problem.
So the distinction between "normal" and "cleaning" recursive targets
has likely been obsolete since by then already. We can thus remove
such distinction, thus reducing some complications and duplication in
our rules. Doing so, the whole testsuite still passes (both with GCC
and Sun C 5.9), even the test 'c-demo.sh', which, among the other
things, exercise the setup described in the obsolete code comment
referenced above.
Finally, note that we still keep '$(RECURSIVE_CLEAN_TARGETS)' and
'$(RECURSIVE_TARGETS)' as two distinct variables, to ensure a better
backward-compatibility for any user-defined rules that happen to use
those variables.
* NEWS: Update.
* lib/am/subdirs.am ($(RECURSIVE_CLEAN_TARGETS), $(CLEAN_TARGETS)):
Merge their recipes.
* t/subdir-distclean.sh: New test, check that "./configure && make
&& make distclean" is actually a no-op, even when conditional SUBDIRS
are involved.
* t/list-of-tests.mk: Add it.
silent: new $(AM_V_P) variable, tell if we're running in silent mode
Addresses part of automake bug#8665.
* automake.in (handle_silent): Define a new make variable '$(AM_V_P)',
that expands to a shell conditional that can be used in make recipes to
determine whether they are being run in silent mode or not. The choice
of the name derives from the LISP convention of appending the letter
'P' to denote a predicate (see also "the '-P' convention" in the Jargon
File); we do so for lack of a better convention.
* t/automake.texi, NEWS: Document the new variable.
* t/silent6.sh: Adjust and extend. Move out the checks that didn't
actually deal with user extension of silent rules ...
* t/silent-obsolescent-warns.sh: ... into this test (bound to be
removed once 'maint' is merged into the 'master' branch).
* t/list-of-tests.mk: Add the new test.
* automake.in (handle_languages): Move definition of $(AM_V_GEN)
variable ...
(define_verbose_tagvar): ... and of '$(AM_V_at)' variable ...
(handle_silent): ... in this new subroutine.
(generate_makefile): Call it.
refactor: &define_verbose_var: accept a third optional argument
This is only required by future changes.
* automake.in (define_verbose_var): Accept a third optional argument,
specifying the value to assign to the given make variable when silent
rules are disabled.
subdir-objects: improve "make mostlyclean" efficiency and flexibility
Fixes automake bug#10697.
Before this change, the generated Makefile issued one 'rm' invocation
for each subdir object file. Not only was this very inefficient when
there were several such files, but it also caused stale object files
to be left behind when a source file was renamed or removed.
* automake.in (handle_single_transform): When a subdir object is seen,
update '%compile_clean_files' to clean all the compiled objects in its
same subdirectory, and all the libtool compiled objects ('.lo') there
as well is that subdir object is a libtool one.
* t/subobj-clean-pr10697.sh: New test.
* t/subobj-clean-lt-pr10697.sh: Likewise.
* t/list-of-tests.mk: Add them.
* NEWS: Update.
[ng] tests: merge, tweak and modernize few test scripts
* t/specflg.sh, t/specflg2.sh, t/specflg3.sh: Merged into ...
* t/per-target-flags.sh: ... this test.
* t/fo.sh: Remove, its weak grepping checks well superseded by
the semantic checks in 't/fort4.sh'.
* t/cxxo.sh: Remove, its weak grepping checks well superseded
by the semantic checks in 't/cxx-demo.sh'.
* t/cxxcpp.sh: Enhance a little.
* t/empty.sh: Renamed ...
* t/empty-data-primary.sh: ... to this. Add trailing ':' command.
* t/empty2.sh, t/empty3.sh, t/empty4.sh: Merged ...
* t/empty-sources-primary.tap: ... into this new test.
* t/no-outdir-option.sh: Remove. A test to check than an obsolete
and now deleted option ("--output-dir") stays deleted is way too
much even for the most test-infected person ;-)
* master:
tests: look for '.lo' rather than '.o' object when using Libtool with C++
cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
tests: add basic semantic tests on C++ support
tests: minor tweak to 't/objc-megademo.sh'
* maint:
tests: look for '.lo' rather than '.o' object when using Libtool with C++
cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
tests: add basic semantic tests on C++ support
tests: minor tweak to 't/objc-megademo.sh'
* t/objc-megademo.sh (am_create_testdir): Define to "empty" before
including ./defs, because this test doesn't rely on the files usually
pre-set by the setup in there.
* t/subobj10.sh: The use of find(1) without an explicitly given
file or directory argument (as in "find -name '*.o'" instead of
"find . '-name.o'") is mostly a GNU extension, and not portable
to POSIX find. Fix it.
* master:
cleanup: simplify subroutine '&saw_extension'
cleanup: remove subroutine '&saw_sources_p'
cleanup: remove unused '&count_files_for_language' subroutine
automake: simplify '&saw_sources_p'
tags: look at $(am__tagged_files) to decide whether to activate
tags: new var $(am__tagged_files) to list all files to run taggers on
tags (cscope): also process $(TAGS_FILES)
tags (ID, cscope): also process config header (if any)
+ Extra non-trivial edits:
* automake.in (handle_tags): Adjust the call to 'define_variable' for
the variable '$(am__tagged_files)' to the different signature we have
in Automake-NG, i.e., "define_variable($VAR, $WHERE, @VALUE)" rather
than "define_variable($VAR, $VALUE, $WHERE)".
* Makefile.am ($(versioned_mans)): Pass 'aclocal-$(APIVERSION)' and
'automake-$(APIVERSION)' to the 'help2man' invocation, rather than
'aclocal' and 'automake', since otherwise the system-wide automake
and aclocal programs would be used instead of the proper wrappers in
't/wrap'.
Merge branch 'ng/depcomp-unify-o-obj-rules' into ng/master
* ng/depcomp-unify-o-obj-rules:
[ng] depcomp: remove unused variable '$source' from the depcomp script
[ng] depcomp: unify rules for '.o' and '.obj' objects
[ng] depcomp: prefer make automatic variables over automake transforms
+ Extra non-trivial edits:
* t/libtool3.sh: Also look for the '.$(OBJEXT)' extension when grepping
the generated Makefile to ensure no explicit rules for the C compilation
has been emitted (only pattern rules should have been).
* t/subdir3.sh: Remove, since the changes done to it in the branch
'ng/depcomp-unify-o-obj-rules' have been obsoleted by the general
semantic changes done in the 'ng/subdir-objects' branch (where this
test had indeed been removed).
* t/subobj4.sh: Likewise.
* automake.in (saw_extension): Now that we use the '%extension_seen'
hash only as a set (it's keys being its elements), we can simplify
the implementation of this function accordingly.
* automake.in (saw_sources_p): Remove, its implementation is now so
trivial that it's easier to inline it into ...
(handle_languages): ... it's only caller.
This is just a minor cleanup. No semantic change is intended.
* automake.in (saw_sources_p): Since its now-only caller calls it with
the '0' argument, remove the code paths that assumed the argument could
be '1', and assume no arguments.
(handle_languages): Drop the arguments '0' in the '&saw_sources_p'
invocation.
tags: look at $(am__tagged_files) to decide whether to activate
This is just a preparatory refactoring in view of future changes.
* automake.in (handle_tags): To decide whether to include the tags rules,
rely on whether the automake-defined variable $(SOURCES) is non-empty,
rather than on the fact that '&saw_sources(1)' returns true.
tags: new var $(am__tagged_files) to list all files to run taggers on
This change reduce code duplication a little, and will be needed by
future simplifications.
* automake.in (handle_tags): Define a new 'am__tagged_files' private
make variable that lists all files to run taggers (mkid, cscope, ctags,
etc) on. Drop the now-useless transform '%CONFIG%' when including
'tags.am'.
* lib/am/tags.am: Use it in several recipes and dependencies list to
reduce code duplication.
[ng] depcomp: remove unused variable '$source' from the depcomp script
* lib/am/depend2.am (%.c -> %.$(OBJEXT) compilation recipes): Do not
pass the path of the source file in the 'source' environment variable
to the invocation of the 'depcomp' script.
* lib/depcomp: Don't document the 'source' environment variable, and
do not abort if it is not set; that variable wasn't actually used
anyway.
[ng] depcomp: unify rules for '.o' and '.obj' objects
This change just reduces code duplication and size of the generated
Makefiles a little. No actual semantic change is intended.
* automake.in (handle_languages): Drop the '%OBJOBJ%' transform.
* lib/am/depend2.am (am__o_src): New, return the path of the source
file corresponding to the target compiled object unchanged when the
object has the '.o' suffix, and returns a proper invocation of
'$(CYGPATH_W)' on that same source file when the object has the
'.obj' suffix.
Using the new $(am__o_src) function, unify rules for the creation of
'.o' and '.obj' objects into a rule for the creation of '.$(OBJEXT)'
objects.
* t/ext.sh: Adjust grepping checks.
* t/ext2.sh: Likewise.
* t/libtool3.sh: Likewise.
* t/objc-basic.sh: Likewise.
* t/objcxx-basic.sh: Likewise.
* t/silent-many-gcc.sh: Likewise.
* t/silent-many-generic.sh: Likewise.
* t/specflg6.sh: Likewise.
* t/subdir3.sh: Likewise.
* t/subobj4.sh: Likewise.
* t/suffix.sh: Likewise.
* t/suffix2.sh: Likewise.
* t/empty2.sh: Enhance a little.
* t/empty3.sh: Likewise.
* t/specflg.sh: Likewise, and adjust comments.
* t/specflg2.sh: Likewise.
* t/pr87.sh: Remove an obsolete check (obsolete since our switch
from suffix rules to pattern rules for C compilation recipes).
[ng] cleanup: after enabling of subdir-objects unconditionally
Few minor cleanups made possible by earlier changes, plus other minor
cleanups triggered in cascade. No semantic change is intended.
* automake.in (LANG_IGNORE, LANG_SUBDIR): Remove.
(register_language ('name' => 'vala', ...)): Add '.vapi' to the entry
'extensions', and simplify the entry 'output_extensions' to point to a
dummy subroutine (since it wasn't really used anyway).
(handle_single_transform): Don't expect the 'lang_*_rewrite' subroutines
to return a 'LANG_*' constant anymore, but only a transformed extension,
if required. To decide whether further processing of the source file
should be stopped, rely on a new set of 'lang_*_ignore' subroutines,
defaulting to a subroutine that returns false. Accordingly, don't special
case the handling of '.vapi' files anymore, instead relying on ...
(lang_vala_ignore, lang_header_ignore): ... these new subroutines to avoid
extra processing of C/C++ headers and Vala '.vapi' headers.
(lang_c_rewrite): Adjust to explicitly return an undefined value.
(lang_java_rewrite): Remove.
Remove an outdated comment.
* lib/am/tags.am (cscopelist): Also scan the files (if any) listed in
the '$(TAGS_FILES) variable, for consistency by what is done by the
'ID', 'TAGS' and 'CTAGS' rules.
tags (ID, cscope): also process config header (if any)
* lib/am/tags.am (cscopelist, ID): Also scan the file given by the
'%CONFIG%' transform, for consistency by what is done by the 'TAGS'
and 'CTAGS' rules.
[ng] tests: remove explicit usages of the 'subdir-objects' option
It is enabled unconditionally since the previous change.
* Several tests: Adjust, extend, rework and simplify, as needed.
* t/ax/depcomp-shuffle.sh, t/ax/depcomp.sh: Likewise.
* t/subobj2.sh: Rename ...
* t/subobj-cxx-grep.sh: ... to this, and adjust.
* t/subobj.sh: Rename ...
* t/subobj-c.sh: ... to this, and adjust.
* t/subobj-cxx.sh: New test.
The fact that Automake-generated Makefiles places compiled
object files in the current directory by default, also when the
corresponding source file is in a subdirectory, is basically an
historical accident, due to the fact that the 'subdir-objects'
option had only been introduced in April 1999, starting with
commit 'user-dep-gen-branchpoint-56-g88b5959', and never made
the default, likely to avoid backwards-compatibility issues.
Since we believe the behaviour enabled by the 'subdir-objects'
is the only natural and most useful one, we make it the only
only one available, simplifying the Automake implementation and
APIs a little in the process.
* NG-NEWS: Update.
* doc/automake-ng.texi (Program and Library Variables): The output
object files are not anymore placed in the current directory by
default, but rather in the same directory of the source file.
(LIBOBJS): Now the $(LIBOBJS) and $(ALLOCA) variables can also be
be used outside of the directory where their sources lie.
(List of Automake options): Don't document the 'subdir-objects'
option anymore.
Other related minor adjustments.
* automake.in (LANG_PROCESS): Remove, it's not needed anymore.
(handle_languages): Don't test whether option 'subdir-objects'
is set (just assume it is), and do not use the '%SUBDIROBJ%'
transform when processing '.am' fragments.
(lang_sub_obj): Delete, it would just return 'LANG_SUBDIR'
unconditionally now.
(lang_c_rewrite): Adjust. Don't test whether the option
'subdir-objects' is set (just assume it is).
(lang_yacc_rewrite): Likewise.
(lang_lex_rewrite): Likewise.
(handle_single_transform): Likewise. Remove an obsolete
comment. Add a proper "FIXME" comments about a fragment
of code that might have become dead code now.
(handle_LIBOBJS_or_ALLOCA): Simplify assuming that the option
'subdir-objects' is always set. Accordingly, there's no need
to warn anymore if '$(LIBOBJS)' or '$(ALLOCA)' are used outside
the '$config_libobj_dir' directory (as specified by autoconf
macro 'AC_CONFIG_LIBOBJ_DIR').
* lib/am/depend2.am: Assume the '?SUBDIROBJ?' Automake time
conditional is always true, and remove its use accordingly.
lib/am/depend2.am
* t/ax/depcomp.sh: Adjust to the fact that 'subdir-objects' is
always in effect.
* t/ccnoco2.sh: Likewise.
* t/cscope.tap: Likewise.
* t/depcomp8a.sh: Likewise.
* t/depcomp8b.sh: Likewise.
* t/libtool3.sh: Likewise.
* t/pr401.sh: Likewise.
* t/pr401b.sh: Likewise.
* t/pr401c.sh: Likewise.
* t/lex-line.sh: Likewise.
* t/yacc-line.sh: Likewise.
* t/yacc5.sh: Likewise.
* t/parallel-tests-suffix-prog.sh: Likewise.
* t/fort4.sh: Likewise, and extend a bit.
* t/fort5.sh: Likewise.
* t/gcj.sh: Likewise.
* t/subpkg.sh: Likewise.
* t/subpkg-yacc.sh: Likewise.
* t/xsource.sh: Likewise.
* t/libobj20a.sh: Remove as obsolete.
* t/libobj20b.sh: Adjust heading comments.
* t/libobj20c.sh: Likewise.
* t/subdir3.sh: Remove as obsolete.
* t/subobj4.sh: Likewise.
[ng] parallel-tests: use 'am__error' instead of hand-rolled equivalent
The API offered by 'am__error' (as introduced in recent commit
'v1.12.1-302-g67d6102') is cleaner, and allows us to diagnose more
issues (even if unrelated), rather than stopping at the first one.
* lib/am/parallel-tests.am: Use '$(am__error)' instead of an hand-rolled
poor man's equivalent to diagnose invalid $(TEST_EXTENSIONS). In
particular ...
(am__maybe_invalid_test_extensions): Remove this as now useless.
* NG-NEWS (Warnings and diagnostic): Diagnostic about typos in
'_SOURCES' etc. variable is issued at make, not automake, runtime,
and when undesired can be silenced (totally or partly) with the
help of the 'AM_VARTYPOS_WHITELIST' variable.
[ng] vartypos: allow user to whitelist false positives
It can happen that the user legitimately employs what the new Automake-NG
make runtime warnings would take for an erroneous usage; for example, GNU
coreutils 8.17 uses something like this is its build system (see file
'src/Makefile.am'):
# Shared files.
copy_LDADD =
cp_LDADD += $(copy_LDADD)
ginstall_LDADD += $(copy_LDADD)
mv_LDADD += $(copy_LDADD)
...
copy_LDADD += $(LIB_SELINUX) # for selinux use
copy_LDADD += $(LIB_CLOCK_GETTIME) # for gettime, settime, ...
copy_LDADD += $(LIB_XATTR) # for various xattr functions
...
Since it does so without having a program called 'copy' anywhere, the
Makefile generated by Automake complains like this:
Makefile:2544: variable 'copy_LDADD' is defined but no program
Makefile:2544: or library has 'copy' as canonical name
Makefile:2546: *** Some Automake-NG error occurred. Stop.
Instead of forcing the coreutils developers to heavily edit their Makefile,
it is better to allow them to whitelist their suspicious usages as correct.
And such a whitelisting capability is a good idea even regardless this
motivation, since it helps enforcing the Autotools- philosophy "the user is
always right" (as long as he is explicit enough).
* lib/am/check-typos (.am/vartypos/whitelisted-vars ): Also add the contents
of the user-reserved variable '$(AM_VARTYPOS_WHITELIST)' (note that it is
still undocumented).
* t/vartypos-whitelist.sh: New test.
Merge branches 'ng/check-typos-at-make-runtime' and 'ng/yacc-lex-fixlets' into ng/master
* ng/check-typos-at-make-runtime:
[ng] cleanup: unused variable in the automake script removed
[ng] warns: also report typos for 'LOG_DEPENDENCIES' variables
[ng] warns: typos in '_DEPENDENCIES' variables are now reported
[ng] warns: typos in _SOURCES etc. reported at make runtime
[ng] refactor: new make variables am__all_libs and am__all_ltlibs
[ng] automake: new global variable '%known_ltlibraries'
[ng] coverage: conditional defn of lib_LIBRARIES and lib_LTLIBRARIES
* ng/yacc-lex-fixlets:
[ng] yacc: prefer use of automatic variables over automake-time transforms
[ng] yacc/c++: prefer make-time processing over recipe-time one
[ng] lex: fix a (mostly harmless) typo in code
[ng] refactor: merge lang_{yacc,lex}_finish functions
[ng] cleanup: don't error on 'YACCFLAGS' usage
They are identical after the last commit, so no need to keep them
separated anymore
* automake.in (yacc_lex_finish_helper, lang_yacc_finish,
lang_lex_finish): Merge into ..
(lang_yacc_lex_finish): ... this.
Adjust calls to 'register_language' for Yacc and Lex accordingly.
* automake.in (lang_yacc_finish): Stop calling 'reject_var' on
'YACCFLAGS'; that has been obsolete for such a long time (since
1998 at least!) that is not worth worrying about anymore in
Automake-NG.
[ng] cleanup: unused variable in the automake script removed
* automake.in ($output_header): Remove.
(initialize_per_input): Don't reset it.
(generate_makefile): Don't use its content when creating the output
Makefile: it was always empty anyway.
[ng] warns: also report typos for 'LOG_DEPENDENCIES' variables
* lib/am/parallel-tests.am (am__using_parallel_tests): New, set to
"yes" to inform the rest of the makefile that the parallel testsuite
harness is in use.
* lib/am/check-typos.am (.am/vartypos/whitelisted-vars): Whitelist
only 'LOG_DEPENDENCIES' variables that actually correspond to a
declared test extension.
* t/vartypos-deps.sh: New test.
[ng] warns: typos in '_DEPENDENCIES' variables are now reported
Detection of those typos had been disabled in commit in commit
'v1.12-295-g9a5f837' of 2012-05-22, "[ng] warns: don't report possible
issues with '_DEPENDENCIES' variables", to avoid spurious errors.
* lib/am/check-typos.am (.am/vartypos/suffixes): Add '_DEPENDENCIES'.
(.am/vartypos/whitelisted-vars): Extend accordingly to avoid spurious
errors.
* t/vartypos.sh: Extend to also test bad usages of '_DEPENDENCIES'
variables.
[ng] warns: typos in _SOURCES etc. reported at make runtime
For example, on an input:
bin_PROGRAMS = frob
forb_SOURCES = main.c
a proper warning should be given, since either 'forb' or 'frob' is likely a
typo. Mainline Automake gives the warning at automake runtime, while with
this change, the warnings will be moved at make runtime. This will allow
us to warn about variables like '_DEPENDENCIES', whose definitions can
be unavailable (or unanalyzable) at automake runtime (check about those
variables had to be disabled in commit 'v1.12-295-g9a5f837' of 2012-05-22,
"[ng] warns: don't report possible issues with '_DEPENDENCIES' variables",
to avoid spurious errors).
* automake.in (generate_makefile): Emit code to perform make runtime
checks, in particular those moved out from ...
(check_typos): ... this now-deleted function ...
* lib/am/check-typos.am: ... into this new Makefile fragment.
* Makefile.am (dist_am_DATA): Add the new file.
* lib/am/header-vars.am (am__error): New internal function, declares an
error without immediately terminating the make process. Allows us to
diagnose more issues at once, rather than stopping at the first one.
* t/spell.sh: Adjust and extend.
* t/spell2.sh: Likewise.
* t/warnopts.sh: Adjust.
* t/vartypo2.sh: Remove, its content adjusted and merged ...
* t/vartypos.sh: ... into this test, adjusted and extended as well.
[ng] refactor: new make variables am__all_libs and am__all_ltlibs
This change is only a preparatory refactoring in view of future changes.
* t/all-progs.sh: Renamed ...
* t/all-prog-libs.sh: ... like this, and extended.
* automake.in (generate_makefile): Define the make vars 'am__all_libs'
and 'am__all_ltlibs' respectively from the sorted keys of the hashes
'%known_libraries' and '%known_ltlibraries'. For consistency, and for
offering a better stability of the output Makefiles, sort the keys of
the '%known_programs' hash before using them to define the make variable
'am__all_progs'.
[ng] automake: new global variable '%known_ltlibraries'
This is just a preparatory refactoring in view of future changes.
* automake.in (%known_ltlibraries): New global variable.
(initialize_per_input): Reset it.
(handle_ltlibraries): Register processed libtool libraries in
'%known_ltlibraries' rather than in '%known_libraries'.
(lang_vala_finish): Also take into account the contents of
'%known_ltlibraries'; since we are at it, refactor a little
to remove some inconsistency and code duplication.
[ng] internals: copy 'header-vars.am' more verbatim in the output makefile
* automake.in (define_standard_variables): The 'header-vars.am' file should
contain no rule definition, nor any variable definition that must be known
at automake runtime; so we can read and process that file's content using
the 'preprocess_file' function rather than the 'file_contents_internal' one.
This will allow us to make a more liberal use of GNU make builtins in there,
like the 'define' builtin.
* t/comment4.sh: Adjust.
* t/vpath.sh: Likewise.
* t/txinfo17.sh (texinfo.texi): Use "foobar", not "example", as the
argument of the @setfilename call, to ensure we don't get false
positives in the later grepping checks.
In GNU make, '$^' used in a recipe contains every dependency for the
target, even those not declared when the recipe is read; for example,
on:
all: foo1; @echo $^
all: foo2
"make all" would output "foo1 foo2". This is not Automake's fault,
as some comments incorrectly stated. See also:
<http://lists.gnu.org/archive/html/help-make/2012-05/msg00029.html>
* lib/am/texinfos.am: Fix those incorrect comments, and document the
GNU make behaviour described above.
* t/suffix-custom-link.sh: Rewrite a little to avoid triggering warnings
from the 'sc_tests_here_document_format' maintainer check.
* syntax-checks.mk (sc_diff_aclocal_in_aclocal,
sc_diff_automake_in_automake): Rename ...
(sc_diff_aclocal_in_aclocal,
sc_diff_automake_in_automake): ... respectively to these, rewrite to use
static pattern rules and 'diff -u' instead of bare 'diff', and fix the
count of expected differences to account for the removed substitution of
'@SHELL@' in automake.in.
(syntax_check_rules): Adjust.
* master: (21 commits)
news: document deprecation of configure.in
news: put planned backward compatibilities early
sync: update files from upstream with "make fetch"
maint: deprecate 'configure.in' as autoconf input
maint: post-release minor version bump
release: stable release 1.12.1
copyright: update copyright years in a couple of files
tests: avoid spurious failures with Solaris 9 cscope program
maintcheck: fix a spurious failure
perf: beginning of a performance testsuite
aclocal: declare function prototypes, do not use '&' in function calls
news: support for configure.in will be dropped in future automake versions
missing: support AC_CONFIG_HEADERS in addition to obsolete AC_CONFIG_HEADER
missing: don't bother checking for AM_CONFIG_HEADER: it is gone now
docs: remove mention of AM_CONFIG_HEADER: it is obsolete and removed now
tests: fix botched heading comments in 'lex-clean-cxx.sh'
[ng] maintcheck: some tweaks and fixlets
help: fix a typo in the list of warning categories
maint: version bump after beta release
release: beta release 1.12.0b (will become 1.12.1)
...
+ Extra non-trivial edits:
* Makefile.am (TESTS): Add the tests in the 't/perf' directory.
* maint:
news: document deprecation of configure.in
news: put planned backward compatibilities early
sync: update files from upstream with "make fetch"
maint: deprecate 'configure.in' as autoconf input
maint: post-release minor version bump
release: stable release 1.12.1
copyright: update copyright years in a couple of files
tests: avoid spurious failures with Solaris 9 cscope program
maintcheck: fix a spurious failure
perf: beginning of a performance testsuite
aclocal: declare function prototypes, do not use '&' in function calls
news: support for configure.in will be dropped in future automake versions
tests: fix botched heading comments in 'lex-clean-cxx.sh'
[ng] maintcheck: some tweaks and fixlets
help: fix a typo in the list of warning categories
maint: version bump after beta release
release: beta release 1.12.0b (will become 1.12.1)
release: remove overly picky check