]> git.ipfire.org Git - thirdparty/automake.git/log
thirdparty/automake.git
13 years ago[ng] texi: drop support for '.txi' and '.texinfo' suffixes
Stefano Lattarini [Sun, 17 Jun 2012 09:50:55 +0000 (11:50 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] coverage: texinfo silent rules with a subdir texinfo file
Stefano Lattarini [Sun, 17 Jun 2012 08:48:41 +0000 (10:48 +0200)] 
[ng] coverage: texinfo silent rules with a subdir texinfo file

* t/silent-texi.sh: Enhance.  Fix a minor bug while we are it (it
could potentially have caused false negatives).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: rename silent8.sh -> silent-texi.sh
Stefano Lattarini [Sun, 17 Jun 2012 08:39:40 +0000 (10:39 +0200)] 
[ng] tests: rename silent8.sh -> silent-texi.sh

* t/silent8.sh: Rename ...
* t/silent-texi.sh: ... like this.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: remove some crufty code to support obsolete environment
Stefano Lattarini [Sat, 16 Jun 2012 21:18:13 +0000 (23:18 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: move more code from automake to Makefile
Stefano Lattarini [Sat, 16 Jun 2012 20:58:06 +0000 (22:58 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: "de-prettify" makeinfo command line
Stefano Lattarini [Sat, 16 Jun 2012 20:43:50 +0000 (22:43 +0200)] 
[ng] texi: "de-prettify" makeinfo command line

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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper()
Stefano Lattarini [Sat, 16 Jun 2012 19:20:32 +0000 (21:20 +0200)] 
[ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper()

The former subroutine has been so reduced in scope and size that it is
just easier to merge it with the bigger one.

* automake.in (handle_texinfo_source): Delete, has been merged ...
(handle_texinfo_helper): ... in here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: simplify handle_texinfo_source by assuming '.info' suffix ...
Stefano Lattarini [Sat, 16 Jun 2012 19:09:23 +0000 (21:09 +0200)] 
[ng] texi: simplify handle_texinfo_source by assuming '.info' suffix ...

... for the output info files.

* automake.in (handle_texinfo_source): Here, in particular removing
the local variable '$dsfx'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: move some more knowledge from automake to texi-spec.am
Stefano Lattarini [Sat, 16 Jun 2012 18:52:27 +0000 (20:52 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: in texi-spec.am, assume suffix for info files is always '.info'
Stefano Lattarini [Sat, 16 Jun 2012 18:56:37 +0000 (20:56 +0200)] 
[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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] automake: remove two unused variables from '&handle_texinfo_source'
Stefano Lattarini [Sat, 16 Jun 2012 18:42:45 +0000 (20:42 +0200)] 
[ng] automake: remove two unused variables from '&handle_texinfo_source'

* automake.in (handle_texinfo_source): Remove '$spfx' and '$ssfx'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] coverage: texinfo input files using @include directives
Stefano Lattarini [Sat, 16 Jun 2012 18:31:48 +0000 (20:31 +0200)] 
[ng] coverage: texinfo input files using @include directives

Both in-tree and VPATH builds, and both top-level and subdir input.

* t/txinfo-include.sh: New test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: always look for mdate-sh in the build-aux directory ...
Stefano Lattarini [Sat, 16 Jun 2012 10:15:42 +0000 (12:15 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactor: more proper name for a subroutine in automake
Stefano Lattarini [Sat, 16 Jun 2012 10:01:58 +0000 (12:01 +0200)] 
[ng] refactor: more proper name for a subroutine in automake

After the past heavy changes, a subroutine's name has got out-of-sync
with its purpose.

* automake.in (output_texinfo_build_rules): Rename ...
* (handle_texinfo_source): ... like this.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: drop a useless transform when processing texinfos.am
Stefano Lattarini [Sat, 16 Jun 2012 09:56:57 +0000 (11:56 +0200)] 
[ng] texi: drop a useless transform when processing texinfos.am

* automake.in (handle_texinfos): Drop now-useless transform %TEXIQUIET%.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: adjust names of vars used for silent rules support
Stefano Lattarini [Sat, 16 Jun 2012 09:11:28 +0000 (11:11 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: drop transforms when reading texibuild.am
Stefano Lattarini [Sat, 16 Jun 2012 08:48:22 +0000 (10:48 +0200)] 
[ng] texi: drop transforms when reading texibuild.am

They are not really needed anymore (being now completely static),
and just inlining them is simpler and clearer.

* lib/am/texibuild.am: Inline transforms ('%TEXIQUIET%',
'%TEXIDEVNULL%', '%AM_V_MAKEINFO%', '%AM_V_DVIPS%', and
'%TEXI-SUFFIXES%').
* automake.in (handle_texinfo): Simplify accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: reorganize '.am' fragments even more
Stefano Lattarini [Sat, 16 Jun 2012 09:35:47 +0000 (11:35 +0200)] 
[ng] texi: reorganize '.am' fragments even more

* 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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: reorganize '.am' fragments a bit
Stefano Lattarini [Sat, 16 Jun 2012 09:16:46 +0000 (11:16 +0200)] 
[ng] texi: reorganize '.am' fragments a bit

* 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'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: reduce code duplication in output Makefile
Stefano Lattarini [Sat, 16 Jun 2012 08:30:07 +0000 (10:30 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: refactoring in texibuild.am
Stefano Lattarini [Sat, 16 Jun 2012 07:39:59 +0000 (09:39 +0200)] 
[ng] texi: refactoring in texibuild.am

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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: reduce code duplication in texibuild.am
Stefano Lattarini [Sat, 16 Jun 2012 06:59:38 +0000 (08:59 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: read 'texibuild' rules more verbatim
Stefano Lattarini [Sat, 16 Jun 2012 06:49:25 +0000 (08:49 +0200)] 
[ng] texi: read 'texibuild' rules more verbatim

No semantic change is intended.

* automake.in (handle_texinfo): Process 'texibuild.am' with
'&process_file' rather than with '&file_contents'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: be sure to only emit generic pattern rules once
Stefano Lattarini [Fri, 15 Jun 2012 21:29:28 +0000 (23:29 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: drop support for suffix-less info files
Stefano Lattarini [Fri, 15 Jun 2012 20:52:36 +0000 (22:52 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: more target-specific variables use in '.info' build rules
Stefano Lattarini [Fri, 15 Jun 2012 20:17:32 +0000 (22:17 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: reimplement '.info' build using target-specific variables
Stefano Lattarini [Fri, 15 Jun 2012 19:48:54 +0000 (21:48 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: tweak rules for HTML generation to spawn only one shell
Stefano Lattarini [Fri, 15 Jun 2012 17:52:34 +0000 (19:52 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texi: simplify by always assuming generic rules
Stefano Lattarini [Fri, 15 Jun 2012 17:19:37 +0000 (19:19 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] general: support a private directory, for use by automake internals
Stefano Lattarini [Fri, 15 Jun 2012 16:50:47 +0000 (18:50 +0200)] 
[ng] general: support a private directory, for use by automake internals

The directory is pointed to by these new internal make variables:

  -  $(am__dir)
  -  $(am__abs_dir)
  -  $(am__top_dir)
  -  $(am__abs_top_dir)

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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texinfo: pattern rules with empty suffixes are OK
Stefano Lattarini [Fri, 15 Jun 2012 15:15:52 +0000 (17:15 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cosmetics: remove few obsolescent comments in autoamake
Stefano Lattarini [Fri, 15 Jun 2012 14:47:42 +0000 (16:47 +0200)] 
[ng] cosmetics: remove few obsolescent comments in autoamake

* automake.in (read_am_file): Remove obsolete comments (about
OSF make limitations).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] coverage: support for double-colon rules both in Automake and GNU make
Stefano Lattarini [Fri, 15 Jun 2012 14:38:48 +0000 (16:38 +0200)] 
[ng] coverage: support for double-colon rules both in Automake and GNU make

* t/double-colon-rules.sh: New test.
* t/spy-double-colon.sh: Remove as superseded.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] subdirs: use static pattern rules to define *-recursive targets
Stefano Lattarini [Sun, 10 Jun 2012 15:34:10 +0000 (17:34 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] subdirs: prefer "make -C dir" over "cd dir && make"
Stefano Lattarini [Fri, 8 Jun 2012 19:37:40 +0000 (21:37 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Fri, 15 Jun 2012 13:37:19 +0000 (15:37 +0200)] 
Merge branch 'master' into ng/master

* 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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'am-preprocess-drop-tricky-transform'
Stefano Lattarini [Fri, 15 Jun 2012 13:07:05 +0000 (15:07 +0200)] 
Merge branch 'am-preprocess-drop-tricky-transform'

* am-preprocess-drop-tricky-transform:
  automake: stop supporting "%KEY?iftrue:iffalse%" transforms
  am: stop using "%KEY:iffalse?iftrue%" transforms

13 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 15 Jun 2012 08:27:27 +0000 (10:27 +0200)] 
Merge branch 'maint'

* 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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'docs-recursion' into maint
Stefano Lattarini [Fri, 15 Jun 2012 08:09:19 +0000 (10:09 +0200)] 
Merge branch 'docs-recursion' into maint

* docs-recursion:
  docs: recursive make considered harmful

13 years agoMerge branch 'silent-custom' into maint
Stefano Lattarini [Fri, 15 Jun 2012 08:09:04 +0000 (10:09 +0200)] 
Merge branch 'silent-custom' into maint

* 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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] all, check, install: move more processing at make runtime
Stefano Lattarini [Sun, 6 May 2012 20:54:45 +0000 (22:54 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] built sources: enhance testsuite coverage
Stefano Lattarini [Sun, 6 May 2012 18:59:28 +0000 (20:59 +0200)] 
[ng] built sources: enhance testsuite coverage

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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoautomake: stop supporting "%KEY?iftrue:iffalse%" transforms
Stefano Lattarini [Thu, 14 Jun 2012 21:45:08 +0000 (23:45 +0200)] 
automake: stop supporting "%KEY?iftrue:iffalse%" transforms

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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoam: stop using "%KEY:iffalse?iftrue%" transforms
Stefano Lattarini [Thu, 14 Jun 2012 21:41:58 +0000 (23:41 +0200)] 
am: stop using "%KEY:iffalse?iftrue%" transforms

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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: minor reorganization of few tests
Stefano Lattarini [Thu, 14 Jun 2012 21:27:42 +0000 (23:27 +0200)] 
tests: minor reorganization of few tests

* t/subdir3.sh: Rename ...
* t/sourcefile-in-subdir.sh: ... like this.
* t/subdir4.sh: Rename ...
* t/depcomp-implicit-auxdir.sh: ... like this.
* t/subdir6.sh: Rename ...
* t/confh-subdir-clean.sh: ... like this.
* t/subdir7.sh: Renamed ...
* t/dir-named-obj-is-bad.sh: ... like this, and enhance.
* t/srcsub.sh, t/srcsub2.sh: Unify ...
* t/src-acsubst.sh: ... as this test.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agofixup: adjust t/list-of-tests.mk for renamed/added tests
Stefano Lattarini [Thu, 14 Jun 2012 21:04:33 +0000 (23:04 +0200)] 
fixup: adjust t/list-of-tests.mk for renamed/added tests

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agosubdirs: enhance coverage, tweak and rename few tests
Stefano Lattarini [Thu, 14 Jun 2012 20:47:28 +0000 (22:47 +0200)] 
subdirs: enhance coverage, tweak and rename few tests

* t/subdir5.sh: Rename ...
* t/subdir-add-pr46.sh: ... like this.
* t/subdir8.sh: Rename ...
* t/subdir-add2-pr46.sh: ... like this.
* t/cond2.sh: Rename ...
* t/subdir-cond-err.sh: ... like this.
* t/subdir9.sh: Rename ...
* t/subdir-with-slash.sh: ... like this; improve heading comments.
* t/subcond.sh: Rename ...
* t/subdir-cond-gettext.sh: ... like this; improve m4 quoting.
* t/subcond2.sh: Rename ...
* t/subdir-am-cond.sh: ... like this; adjust heading comments.
* t/subcond3.sh: Rename ...
* t/subdir-ac-subst.sh: ... like this; adjust heading comments.
* t/subdir2.sh: Rename ...
* t/subdir-subsub.sh: ... like this; enhance so that it also runs
'./configure' and 'make'.
* t/subdir-order.sh: New test, check that the $(SUDBIRS) entries
are processed in the order they are specified.
* doc/automake.texi: Adjust references to tests.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agosync: update files from upstream with "make fetch"
Stefano Lattarini [Thu, 14 Jun 2012 14:32:47 +0000 (16:32 +0200)] 
sync: update files from upstream with "make fetch"

* lib/config.guess, lib/gitlog-to-changelog, lib/texinfo.tex: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agopy-compile: consistently quote 'like this', not `like this'.
Stefano Lattarini [Thu, 14 Jun 2012 14:30:16 +0000 (16:30 +0200)] 
py-compile: consistently quote 'like this', not `like this'.

* lib/py-compile (usage_error): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng]: tests: avoid spurious failure with Korn shells
Stefano Lattarini [Wed, 13 Jun 2012 11:10:46 +0000 (13:10 +0200)] 
[ng]: tests: avoid spurious failure with Korn shells

* t/test-driver-custom-multitest-recheck2.sh: Don't call 'unset' on
the variable 'var', that is never actually set.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agodocs: recursive make considered harmful
Stefano Lattarini [Tue, 12 Jun 2012 15:24:21 +0000 (17:24 +0200)] 
docs: recursive make considered harmful

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".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'subdirs-simplify' into maint
Stefano Lattarini [Tue, 12 Jun 2012 14:12:45 +0000 (16:12 +0200)] 
Merge branch 'subdirs-simplify' into maint

* subdirs-simplify:
  docs: clean rules are not run in reverse order of build rules anymore

13 years agodocs: clean rules are not run in reverse order of build rules anymore
Stefano Lattarini [Tue, 12 Jun 2012 14:10:19 +0000 (16:10 +0200)] 
docs: clean rules are not run in reverse order of build rules anymore

At least since commit 'v1.12.1-12-gec6a135' of 2012-06-10, "subdirs: unify
rules for "cleaning" and "normal" recursive targets"

* doc/automake.texi (Recursing subdirectories): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng]: tests: don't check whether $MAKE is GNU make -- of course it is
Stefano Lattarini [Tue, 12 Jun 2012 13:39:19 +0000 (15:39 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Tue, 12 Jun 2012 12:01:45 +0000 (14:01 +0200)] 
Merge branch 'master' into ng/master

* 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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Mon, 11 Jun 2012 19:39:46 +0000 (21:39 +0200)] 
Merge branch 'maint'

* 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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'subdir-objects-pr10697' into maint
Stefano Lattarini [Mon, 11 Jun 2012 19:27:12 +0000 (21:27 +0200)] 
Merge branch 'subdir-objects-pr10697' into maint

* subdir-objects-pr10697:
  maintcheck: fix failures, both real and spurious

13 years agomaintcheck: fix failures, both real and spurious
Stefano Lattarini [Mon, 11 Jun 2012 19:21:32 +0000 (21:21 +0200)] 
maintcheck: fix failures, both real and spurious

* 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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: merged some testsuite fixlets
Stefano Lattarini [Mon, 11 Jun 2012 17:48:08 +0000 (19:48 +0200)] 
tests: merged some testsuite fixlets

* fix-cxx-libtool-demo:
  tests: avoid failure due to libtool quirks in C++ demo test

* subdir-objects-pr10697:
  tests: fix spurious failures due to missing '$sleep'

* subdirs-simplify:
  subdir tests: avoid an use of "make -j4", for portability

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agosubdir tests: avoid an use of "make -j4", for portability
Stefano Lattarini [Mon, 11 Jun 2012 17:46:46 +0000 (19:46 +0200)] 
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).

* t/subdir-distclean.sh : Call simply "make maintainer-check", not
"make -j4 maintainer-check".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: avoid failure due to libtool quirks in C++ demo test
Stefano Lattarini [Mon, 11 Jun 2012 17:38:54 +0000 (19:38 +0200)] 
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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix spurious failures due to missing '$sleep'
Stefano Lattarini [Mon, 11 Jun 2012 16:52:38 +0000 (18:52 +0200)] 
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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branches 'subdirs-simplify' and 'subdir-objects-pr10697' into maint
Stefano Lattarini [Mon, 11 Jun 2012 15:35:35 +0000 (17:35 +0200)] 
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"

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agosubdirs: unify rules for "cleaning" and "normal" recursive targets
Stefano Lattarini [Sun, 10 Jun 2012 21:08:07 +0000 (23:08 +0200)] 
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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: add a "demo" test on C support
Stefano Lattarini [Sun, 10 Jun 2012 22:49:18 +0000 (00:49 +0200)] 
tests: add a "demo" test on C support

Showing and testing non-trivial use of C support, and its interaction
with other features.

* t/c-demo.sh: New test.
* t/list-of-tests.mk: Add it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: look for '.lo' rather than '.o' object when using Libtool with C++
Stefano Lattarini [Sat, 9 Jun 2012 18:13:43 +0000 (20:13 +0200)] 
tests: look for '.lo' rather than '.o' object when using Libtool with C++

* t/cxx-lt-demo.sh: ... in this test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
Stefano Lattarini [Sat, 9 Jun 2012 18:04:24 +0000 (20:04 +0200)] 
cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"

The typofixes offered by this patch have been suggested by the
"codespell.py" script.  Reference:
<http://git.profusion.mobi/cgit.cgi/lucas/codespell/>

* old/ChangeLog.01, old/ChangeLog.02, old/ChangeLog.03: Fix few typos.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agosilent: new $(AM_V_P) variable, tell if we're running in silent mode
Stefano Lattarini [Mon, 11 Jun 2012 14:12:01 +0000 (16:12 +0200)] 
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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agorefactor: silent rules handling (a little)
Stefano Lattarini [Mon, 11 Jun 2012 11:00:23 +0000 (13:00 +0200)] 
refactor: silent rules handling (a little)

* 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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agorefactor: &define_verbose_var: accept a third optional argument
Stefano Lattarini [Mon, 11 Jun 2012 10:48:29 +0000 (12:48 +0200)] 
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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomaint: grammar fixes: s/all these/all of these/
Jim Meyering [Sun, 10 Jun 2012 20:03:49 +0000 (22:03 +0200)] 
maint: grammar fixes: s/all these/all of these/

Run this command:
  git grep -li '\<all.these\>' \
    |xargs perl -pi -e 's/\b([Aa])ll these\b/${1}ll of these/'

13 years ago[ng] cosmetics: remove trailing whitespace from few files
Stefano Lattarini [Sun, 10 Jun 2012 12:12:55 +0000 (14:12 +0200)] 
[ng] cosmetics: remove trailing whitespace from few files

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agosubdir-objects: improve "make mostlyclean" efficiency and flexibility
Stefano Lattarini [Sun, 10 Jun 2012 11:38:58 +0000 (13:38 +0200)] 
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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: merge, tweak and modernize few test scripts
Stefano Lattarini [Sat, 9 Jun 2012 18:49:09 +0000 (20:49 +0200)] 
[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 ;-)

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] maintcheck: fix failures introduced by the recent merge of master
Stefano Lattarini [Sat, 9 Jun 2012 19:17:33 +0000 (21:17 +0200)] 
[ng] maintcheck: fix failures introduced by the recent merge of master

* t/cxx-lt-demo.sh: Avoid use of "make -e".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Sat, 9 Jun 2012 18:52:26 +0000 (20:52 +0200)] 
Merge branch 'master' into ng/master

* 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'

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Sat, 9 Jun 2012 18:15:18 +0000 (20:15 +0200)] 
Merge branch 'maint'

* 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'

13 years agotests: look for '.lo' rather than '.o' object when using Libtool with C++
Stefano Lattarini [Sat, 9 Jun 2012 18:13:43 +0000 (20:13 +0200)] 
tests: look for '.lo' rather than '.o' object when using Libtool with C++

* t/cxx-lt-demo.sh: ... in this test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
Stefano Lattarini [Sat, 9 Jun 2012 18:04:24 +0000 (20:04 +0200)] 
cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"

The typofixes offered by this patch have been suggested by the
"codespell.py" script.  Reference:
<http://git.profusion.mobi/cgit.cgi/lucas/codespell/>

* old/ChangeLog.01, old/ChangeLog.02, old/ChangeLog.03: Fix few typos.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: add basic semantic tests on C++ support
Stefano Lattarini [Sat, 9 Jun 2012 13:11:10 +0000 (15:11 +0200)] 
tests: add basic semantic tests on C++ support

Strange as it might seem, we were still missing them (yikes).

* t/cxx-demo.sh: New test.
* t/cxx-lt-demo.sh: Likewise (using libtool).
* t/list-of-tests.mk: Add them.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: minor tweak to 't/objc-megademo.sh'
Stefano Lattarini [Sat, 9 Jun 2012 11:50:12 +0000 (13:50 +0200)] 
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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: fix unportable find(1) usage
Stefano Lattarini [Sat, 9 Jun 2012 11:12:35 +0000 (13:12 +0200)] 
[ng] tests: fix unportable find(1) usage

* 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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Sat, 9 Jun 2012 09:57:00 +0000 (11:57 +0200)] 
Merge branch 'master' into ng/master

* 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)".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] docs: fix a bug in generation of man pages
Stefano Lattarini [Sat, 9 Jun 2012 09:23:56 +0000 (11:23 +0200)] 
[ng] docs: fix a bug in generation of man pages

* 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'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/depcomp-unify-o-obj-rules' into ng/master
Stefano Lattarini [Sat, 9 Jun 2012 08:25:10 +0000 (10:25 +0200)] 
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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocleanup: simplify subroutine '&saw_extension'
Stefano Lattarini [Thu, 7 Jun 2012 17:14:30 +0000 (19:14 +0200)] 
cleanup: simplify subroutine '&saw_extension'

* 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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocleanup: remove subroutine '&saw_sources_p'
Stefano Lattarini [Thu, 7 Jun 2012 17:14:12 +0000 (19:14 +0200)] 
cleanup: remove subroutine '&saw_sources_p'

* 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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocleanup: remove unused '&count_files_for_language' subroutine
Stefano Lattarini [Thu, 7 Jun 2012 17:13:39 +0000 (19:13 +0200)] 
cleanup: remove unused '&count_files_for_language' subroutine

* automake.in (count_files_for_language): Remove.  Its only remaining
caller (saw_sources_p) has stopped calling it in the previous commit.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoautomake: simplify '&saw_sources_p'
Stefano Lattarini [Thu, 7 Jun 2012 17:12:43 +0000 (19:12 +0200)] 
automake: simplify '&saw_sources_p'

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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotags: look at $(am__tagged_files) to decide whether to activate
Stefano Lattarini [Thu, 7 Jun 2012 17:12:11 +0000 (19:12 +0200)] 
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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotags: new var $(am__tagged_files) to list all files to run taggers on
Stefano Lattarini [Thu, 7 Jun 2012 18:13:37 +0000 (20:13 +0200)] 
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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] depcomp: remove unused variable '$source' from the depcomp script
Stefano Lattarini [Thu, 7 Jun 2012 01:06:10 +0000 (03:06 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] depcomp: unify rules for '.o' and '.obj' objects
Stefano Lattarini [Thu, 7 Jun 2012 00:26:17 +0000 (02:26 +0200)] 
[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).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/subdir-objects' into ng/master
Stefano Lattarini [Fri, 8 Jun 2012 10:36:21 +0000 (12:36 +0200)] 
Merge branch 'ng/subdir-objects' into ng/master

* ng/subdir-objects:
  [ng] cleanup: after enabling of subdir-objects unconditionally
  [ng] tests: remove explicit usages of the 'subdir-objects' option
  [ng] subdir-objects: enable unconditionally
  [ng] automake: don't define many identical 'lang_*_rewrite' subroutines

13 years ago[ng] cleanup: after enabling of subdir-objects unconditionally
Stefano Lattarini [Thu, 7 Jun 2012 15:04:26 +0000 (17:04 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] depcomp: prefer make automatic variables over automake transforms
Stefano Lattarini [Wed, 6 Jun 2012 23:52:37 +0000 (01:52 +0200)] 
[ng] depcomp: prefer make automatic variables over automake transforms

* lib/am/depend2.am: Here, in several recipes.
* t/specflg3.sh: Adjust grepping checks
* t/subobj4.sh: Relax grepping checks.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotags (cscope): also process $(TAGS_FILES)
Stefano Lattarini [Thu, 7 Jun 2012 17:41:37 +0000 (19:41 +0200)] 
tags (cscope): also process $(TAGS_FILES)

* 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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotags (ID, cscope): also process config header (if any)
Stefano Lattarini [Thu, 7 Jun 2012 17:19:15 +0000 (19:19 +0200)] 
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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: remove explicit usages of the 'subdir-objects' option
Stefano Lattarini [Thu, 7 Jun 2012 08:38:29 +0000 (10:38 +0200)] 
[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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] subdir-objects: enable unconditionally
Stefano Lattarini [Wed, 6 Jun 2012 08:27:46 +0000 (10:27 +0200)] 
[ng] subdir-objects: enable unconditionally

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.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>