[ng] texi: drop support for '.txi' and '.texinfo' suffixes
The former was only needed to cater to 8+3 file systems (for which
we have dropped support anyway), and the latter was hardly used in
practice, it's extra "eye-candy" not worth complicating the code.
We now only accept and handle files with a '.texi' suffix.
* NG-NEWS: Update.
* automake.in (handle_texinfo_helper): Drop support for '.txi'
and '.texinfo' suffixes.
(scan_texinfo_files): Likewise.
* lib/am/texibuild.am: Simplify accordingly, assuming '.texi'
as the only valid suffix for Texinfo input files.
* t/txinfo-rules-once.sh: Resurrect this test, and enhance it
a little, also merging in the suitably adapted contents of ...
* t/txinfo9.sh: ... this test, now deleted.
* t/txinfo6.sh: Remove as obsolete.
[ng] texi: remove some crufty code to support obsolete environment
* lib/am/texi-vers.am (%STAMPVTI%): We don't really care anymore about
older systems whose 'mv' program can't move across file systems, nor do
we care about past problems of GNU mv in the AmigaDOS environment. So
simplify the code accordingly.
[ng] texi: move more code from automake to Makefile
The previous changes left us with this low-hanging fruit to pick.
* automake.in (handle_texinfo_helper): Since the $makeinfoflags contents
are now static, we don't need to define that variable anymore, nor to
pass the '%MAKEINFOFLAGS%' transform to 'texi-spec.am', nor ...
* lib/am/texi-spec.am: ... to use that transform here to define the target
specific variable '$(am__makeflags)'; we can just ...
* lib/am/texibuild.am: .. inline the static content in the appropriate
rules here.
This will make some future changes easier. And anyway, it's usually not
worth to add code complexity to have a slightly pretty output from make;
people who want pretty output should be using "make V=0" anyway ;-)
* automake.in (handle_texinfo_helper): Make definition of $makeinfoflags
less pretty but more easy.
[ng] texi: move some more knowledge from automake to texi-spec.am
* automake.in (handle_texinfo_source): Do not define '$dipfx',
nor use it for the transform '%DEST_INFO_PREFIX%'.
* lib/am/texi-spec.am: Adjust the prefix of the output info file
by adding '$(srcdir)' to it if the '?INSRC?' transform is true.
[ng] texi: in texi-spec.am, assume suffix for info files is always '.info'
This has been the case since an earlier patch.
* lib/am/texi-spec.am: Simply use '.info' instead of '%DEST_SUFFIX%'.
* automake.in (handle_texinfo_source): Drop the now-useless transform
'%DEST_SUFFIX%' for texi-spec.am
[ng] texi: always look for mdate-sh in the build-aux directory ...
... rather than in the current directory if the path of the build-aux
directory had been determined automatically and not explicitly specified
through an AC_CONFIG_AUX_DIR invocation. This rid us of an ugly
inconsistency wart that was only present for historical reasons.
* automake.in (handle_texinfo_helper): Do not look for the required file
'mdate-sh' in the current directory if $config_aux_dir_set_in_configure_ac
is false; unconditionally look for it in the build-aux directory.
* lib/am/texi-vers.am: Simplify accordingly, getting rid of the (now
undefined by automake) transform %MDDIR%.
* t/mdate4.sh: Remove as obsolete.
* t/vtexi.sh: Remove an hairy and obsolescent grepping check, to avoid
spurious failures.
* t/reqd.sh: Adjust not to check for multiple installations of mdate-sh;
these don't take place anymore.
[ng] texi: adjust names of vars used for silent rules support
* lib/am/texibuild.am, automake.in (define_verbose_texinfo): Modify
so that the variables $(AV_texinfo) and $(AM_texidevnull) get renamed
with the much clearer and more proper names $(AM_TEXI_QUIETOPTS) and
$(AM_TEXI_DEVNULL_REDIRECT).
* t/silent8.sh: Enhance.
* lib/am/texinfos.am (TEXI2DVI, TEXI2PDF, DVIPS, MAKEINFOHTML,
AM_MAKEINFOHTMLFLAGS): Move these variables' definitions ...
* lib/am/texibuild.am: ... in here, since their only uses are
here.
* lib/am/texinfos.am (%.ps: %.dvi): Move ...
* lib/am/texibuild.am: ... here, which is a more appropriate place
for such a rule.
* automake.in (handle_texinfo): Drop '%AM_V_DVIPS%' when processing
'texinfos.am'; instead, use it when processing 'texibuild.am'.
[ng] texi: reduce code duplication in output Makefile
No semantic change is intended.
* lib/am/texibuild.am: Use a make-runtime $(foreach) loop to define the
conversion rules for all the accepted Texinfo suffixes ('.txi', '.texi',
'.texinfo'), with the help of ...
(am__texi_rules_for_suffix): ... this new internal make function.
* automake.in (handle_texinfo): Adjust.
* t/txinfo6.sh: Adjust and extend.
* t/txinfo-rules-once.sh: Remove as obsolete.
This is only to simplify future changes; no semantic change is
intended.
* lib/am/texibuild.am
(am__texibuild_info): New internal make function.
(%.info: %.%TEXI-SUFFIX%): Use it for the recipe.
(am__texibuild_html): New internal make function.
(%.html: %.%TEXI-SUFFIX%): Use it for the recipe.
[ng] texi: reduce code duplication in texibuild.am
No semantic change is intended.
* lib/am/texibuild.am (am__texibuild_dvi_or_pdf): New internal
make function.
(%.dvi: %.%TEXI-SUFFIX%): Use it for the recipe.
(%.pdf: %.%TEXI-SUFFIX%): Likewise.
[ng] texi: be sure to only emit generic pattern rules once
* lib/am/texibuild.am: Only hold generic pattern rules now, the
stuff specific to single '.texi' files moved out ...
* lib/am/texi-spec.am: ... to this new file.
* Makefile.am (dist_am_DATA): Add it.
* automake.in (output_texinfo_build_rules): Process 'texi-spec.am'
rather than 'texbuild.am', and adjust transforms accordingly.
(handle_texinfo): Process 'texibuild.am', once for each valid Texinfo
extension (.texi, .txi, .texinfo).
* t/txinfo-rules-once.sh: New test.
[ng] texi: drop support for suffix-less info files
Such support is seldom used, and will get in the way of future, useful
refactorings. We can still re-introduce it at a later time, after the
dust is settled, if there are users' requests in this direction.
* automake.in (scan_texinfo_file): Error out if a input '.texi' file
specifies an output (in the '@setfilename' directive) that doesn't have
a '.info' extension.
(output_texinfo_build_rules): Simplify, by assuming generated info
files ought to have the '.info' extension.
* lib/am/texibuild.am: Likewise.
* NG-NEWS: Update
* t/txinfo3.sh: Remove as obsolete.
* t/txinfo-unrecognized-extension-2.sh: New test.
* t/primary-prefix-valid-couples.sh: Adjust to avoid spurious failures.
* t/txinfo17.sh: Likewise.
* t/txinfo20.sh: Likewise.
* t/vtexi2.sh: Likewise.
* t/mdate2.sh: Likewise.
[ng] texi: more target-specific variables use in '.info' build rules
* lib/am/texibuild.am: Rewrite '.info' targets' recipes and dependencies
to use the target-specific variable 'am__makeinfoflags', set from the
'%MAKEINFOFLAGS%' transform.
[ng] texi: reimplement '.info' build using target-specific variables
This refactoring will be useful in later changes.
* lib/am/texibuild.am (%DEST_SUFFIX%: %%SOURCE_SUFFIX%): Rewrite recipe
to use the target-specific variable 'am__info_insrc', which expands to
"yes" when the '?INSRC?' transform is true, and to the empty string
otherwise.
[ng] texi: tweak rules for HTML generation to spawn only one shell
* lib/am/texibuild.am: Rewrite the recipe for .texi -> .html conversion
to use only one shell invocation, mostly for consistency with the other
recipes (e.g., .texi -> .pdf). This also offers a micro-optimization.
And while we are at it, throw in few other micro-optimizations, and fix
botched indentation.
[ng] texi: simplify by always assuming generic rules
They are assured to work with GNU make even when the '.texi' source
lies in a subdirectory, because in that case also the corresponding
output files ('.pdf', '.ps', '.dvi' and '.html') lies in the same
subdirectory.
* automake.in (output_texinfo_build_rules): Don't define the Boolean
'$generic' anymore. Related simplifications. Drop the 'SOURCE' and
'GENERIC' transforms when processing the 'texibuild.am' file. Remove
obsolete comments.
* lib/am/texibuild.am: Adjust by always assuming that '?GENERIC?'
is true.
and cleaned by the new 'am--distclean-amdir' recipe (prerequisite of
'distclean-am'). It is not created by default; recipes needing it
should add an order-only dependency on it, as in:
am-rule: am-prereq | $(am__dir)
[recipe creating/using files in $(am__dir)]
* lib/am/am-dir.am: New file, define internal make variables that point
to a sandbox directory where we can play freely to implement internal
details that require interaction with the filesystem, and the rules to
properly clean them. This file is not used yet, it's simply put here
so that future rules will be able to use it when and if it's needed.
* automake.in (generate_makefile): Include the new file, through the
'&preprocess_file' subroutine.
* Makefile.am (dist_am_DATA): List the new file.
* t/am-dir.sh: New test.
[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.