]> git.ipfire.org Git - thirdparty/automake.git/log
thirdparty/automake.git
13 years ago[ng] clean: drop minor DOS-related cruft in libtool support
Stefano Lattarini [Thu, 21 Jun 2012 19:49:50 +0000 (21:49 +0200)] 
[ng] clean: drop minor DOS-related cruft in libtool support

* automake.in (handle_libtool): Do not bother cleaning '_libs'
directories, they are only used by Libtool on MS-DOS (and we
don't support that anymore).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: remove 'clean-hdr.am'
Stefano Lattarini [Thu, 21 Jun 2012 19:26:17 +0000 (21:26 +0200)] 
[ng] cleanup: remove 'clean-hdr.am'

It's so small and dumb that it's easier and cleaner to just inline
it in the automake script.

* lib/am/clean-hdr.am: Delete.
* Makefile.am (dist_am_DATA): Remove it.
* automake.in (handle_configure): Just add the header configs and their
stamp files to '%clean_files', instead of processing the now-removed
'clean-hdr.am' to obtain the same effect.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] check: keep cleaning of '.log' and '.trs' files near other rules
Stefano Lattarini [Thu, 21 Jun 2012 10:27:06 +0000 (12:27 +0200)] 
[ng] check: keep cleaning of '.log' and '.trs' files near other rules

* lib/am/parallel-tests.am: Add $(am__test_results), $(am__test_logs)
and $(TEST_SUITE_LOGS) to the list of files removed by "make mostlyclean"
here ...
* automake.in (handle_tests): ... rather than here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: remove 'libtool.am'
Stefano Lattarini [Thu, 21 Jun 2012 08:38:01 +0000 (10:38 +0200)] 
[ng] cleanup: remove 'libtool.am'

It's so small and dumb that it's easier and cleaner to just inline
it in the automake script.

* lib/am/libtool.am: Delete.
* Makefile.am (dist_am_DATA): Remove it.
* automake.in (handle_libtool): Just add the list of all the '.libs'
directories to '%libtool_clean_directories', instead of processing the
now-removed 'libtool.am' to obtain the same effect.  Similarly, when
processing the Makefile in the top-level directory, add 'libtool' and
'config.lt' to '%clean_files'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactor: prefer '&file_contents' over '&file_contents_internals'
Stefano Lattarini [Thu, 21 Jun 2012 08:21:10 +0000 (10:21 +0200)] 
[ng] refactor: prefer '&file_contents' over '&file_contents_internals'

No semantic change intended.

* automake.in (handle_compile): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: merge '%compile_clean_files' in '%clean_files'
Stefano Lattarini [Thu, 21 Jun 2012 07:51:35 +0000 (09:51 +0200)] 
[ng] cleanup: merge '%compile_clean_files' in '%clean_files'

No need to keep them separated anymore.

* automake.in (%compile_clean_files): Delete.
(initialize_per_input): Don't reset it.
(handle_compile): Don't merge '%compile_clean_files'
contents into '%clean_files'.
(handle_single_transform): Update '%clean_files', not
'%compile_clean_files'.
(handle_LIBOBJS_or_ALLOCA): Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactoring: no "cleaning" rules in compile.am
Stefano Lattarini [Thu, 21 Jun 2012 00:10:54 +0000 (02:10 +0200)] 
[ng] refactoring: no "cleaning" rules in compile.am

* automake.in (handle_compile): To ensure the compiled objects are
removed, simply merge the contents of '%compile_clean_files' into
'%clean_files' here, instead of ...
* lib/am/compile.am (am__mostlyclean_files): ... appending them to
this variable here.  While we are at it, remove a stray declaration
of the already-deleted target 'mostlyclean-compile' as ".PHONY".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] clean: don't remove object files in '.' unconditionally
Stefano Lattarini [Thu, 21 Jun 2012 00:01:11 +0000 (02:01 +0200)] 
[ng] clean: don't remove object files in '.' unconditionally

Do that only if some source file is actually present in the current
directory (which might not be the case for, say, projects that use
a non-recursive make setup and have all sources in the 'src' and 'lib'
subdirectories).

* lib/am/compile.am (am__mostlyclean_files): Don't append '*.$(OBJEXT)'
unconditionally.
* lib/am/libtool.am (am__mostlyclean_files): Don't append '*.lo'
unconditionally.
* automake.in (handle_single_transform): Update '%compile_clean_files'
also for sources in the current directory.  Some related adjustments.
Remove obsolete comments while we are at it.
(handle_LIBOBJS_or_ALLOCA): Update '%compile_clean_files' to list
all the object files in the directory of the extra sources brought
in.  Adjust comments accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: remove 'depend.am'
Stefano Lattarini [Wed, 20 Jun 2012 23:38:50 +0000 (01:38 +0200)] 
[ng] cleanup: remove 'depend.am'

It's so small and dumb that it's easier and cleaner to just inline
it in the automake script.

* lib/am/depend.am: Delete.
* Makefile.am (dist_am_DATA): Remove it.
* automake.in (handle_languages): Just add the list of all the '.deps'
directories to %clean_dirs, instead of processing the now-removed
'depend.am' to obtain the same effect.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactoring: move definition of $(am__mv) in depend2.am
Stefano Lattarini [Wed, 20 Jun 2012 23:27:15 +0000 (01:27 +0200)] 
[ng] refactoring: move definition of $(am__mv) in depend2.am

A tiny refactoring only needed by the subsequent change.

* lib/am/depend.am (am__mv): Move definition ...
* lib/am/depend2.am [%?FIRST%]: ... here, with a new explicative
comment.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] automake: new global variable '%clean_dirs'
Stefano Lattarini [Wed, 20 Jun 2012 23:10:14 +0000 (01:10 +0200)] 
[ng] automake: new global variable '%clean_dirs'

Similar to the '%clean_files' variable, but it will allow us to declare
directories (rather than regular files) that are to be cleaned by the
four flavours of cleaning targets ('mostlyclean', 'clean', 'distclean',
'maintainer-clean').  This will be especially useful in later changes.

* automake.in (%clean_dirs): New global.
(initialize_per_input): Reset it.
* automake.in (handle_clean), lib/am/clean.am: Extend to clean the
directories registered in '%clean_dirs'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] clean: do not ignore errors while removing files
Stefano Lattarini [Sat, 2 Jun 2012 13:36:55 +0000 (15:36 +0200)] 
[ng] clean: do not ignore errors while removing files

Possible culprits have been identified with the command "git grep '-rm\b'".

* NG-NEWS: Update.
* lib/am/tags.am, lib/am/distdir.am, lib/am/dejagnu.am, lib/am/clean.am: Do
not prefix recipes invoking "rm" with the "-" recipe modifier: we now want
the cleaning recipes to fail if rm encounters an error.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] clean: revamp recipes and APIs to extend cleaning rules
Stefano Lattarini [Wed, 30 May 2012 17:23:46 +0000 (19:23 +0200)] 
[ng] clean: revamp recipes and APIs to extend cleaning rules

This change it introduces eight new internal variables, which all
can been appended to by our Makefile fragments to declare stuff that
should be cleaned upon the various "make *clean" targets; these new
variables are:

  - am__mostlyclean_files, am__mostlyclean_dirs
  - am__clean_files,       am__clean_dirs
  - am__distclean_files,   am__distclean_dirs
  - am__maintclean_files,  am__maintclean_dirs

This change also ensures that the contents of the $(MOSTLYCLEANFILES),
$(CLEANFILES), $(DISTCLEANFILES) and $(MAINTAINERCLEANFILES) variables
will be cleaned even if those variables were not defined in the
Makefile.am (so that it is now possible to, e.g., define them in a
wrapper GNUmakefile including the Automake-generated Makefile, and
still have the relevant '*clean' targets remove them).

* am/clean.am (distclean): Revamp to implement the new API.
* lib/am/compile.am, lib/am/configure.am, lib/am/dejagnu.am,
lib/am/depend.am, lib/am/clean-hdr.am, lib/am/java.am, lib/am/libs.am,
lib/am/libtool.am, lib/am/lisp.am, lib/am/ltlib.am, lib/am/progs.am,
lib/am/tags.am, lib/am/texi-vers.am, lib/am/texinfos.am: Where possible
and easy, adjust to append to those variables instead of tweaking
or extending the various '*clean' or '*clean-am' targets or their
dependencies.
* automake.in (handle_compile, handle_libtool, handle_clean): Adjust.
* t/cleanvars.sh: New test.
* t/libtoo10.sh: Extend.
* t/libtool.sh, t/libtool2.sh: Remove as obsolete.
* syntax-checks.am: Extend to catch possible typos in the use of
the new variables (for example, it is easy to erroneously write
'am__cleanfiles' instead of 'am__clean_files').

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] clean: simplify cleaning of compiled objects
Stefano Lattarini [Wed, 30 May 2012 16:57:18 +0000 (18:57 +0200)] 
[ng] clean: simplify cleaning of compiled objects

* automake.in (handle_compile): Compiled objects are always to be
removed upon "make mostlyclean", never requiring a much stronger
"make distclean" to be cleaned.  Simplify accordingly.
* am/compile.am: Simplify accordingly, and do not bother cleaning
'*.tab.c' files, that shouldn't be left behind by Automake-generated
Makefiles anyway.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] deptrack: clean depdirs using *clean-am targets
Stefano Lattarini [Wed, 30 May 2012 14:35:34 +0000 (16:35 +0200)] 
[ng] deptrack: clean depdirs using *clean-am targets

* lib/am/depend.am (am--clean-depdirs): New target, removing the
$(DEPDIR) directory.
(distclean, maintainer-clean): Renamed ...
(distclean-am, maintainer-clean-am): ... to these, and depend on the new
target above to clean the $(DEPDIR) directory.  Given the current status
of the Automake internals, this shouldn't cause any change in the automake
behaviour, but the new form of these declarations will be useful in future
refactorings.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] deptrack: remove an obsolete comment
Stefano Lattarini [Wed, 30 May 2012 14:24:59 +0000 (16:24 +0200)] 
[ng] deptrack: remove an obsolete comment

* lib/am/depend.am: Since in Automake-NG the generated Makefile calls
'-include' (not 'include') on the dependency tracking '.Po' files, 'make'
will never fail simply because a '.Po' file is not found.  Remove a
comment regarding the now-impossible include failure.

Co-authored-by: Dave Hart <davehart@gmail.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Wed, 20 Jun 2012 16:50:28 +0000 (18:50 +0200)] 
Merge branch 'master' into ng/master

* master:
  bootstrap: overhaul and improve
  docs: quote 'like this', not `like this'
  fixup: tests: special requirement 'makeinfo-html' removed from ./defs

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

* maint:
  bootstrap: overhaul and improve
  docs: quote 'like this', not `like this'

13 years agobootstrap: overhaul and improve
Stefano Lattarini [Wed, 20 Jun 2012 16:28:02 +0000 (18:28 +0200)] 
bootstrap: overhaul and improve

This fixes several weaknesses and buglets in the 'bootstrap' convenience
target offered in GNUmakefile (and its supporting code).  Refer to the
extensive code comments in there for more details.

* GNUmakefile: Almost completely rewritten.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agodocs: quote 'like this', not `like this'
Stefano Lattarini [Wed, 20 Jun 2012 15:27:57 +0000 (17:27 +0200)] 
docs: quote 'like this', not `like this'

* doc/automake.texi: Fix the reported warnings and informative messages
from automake to quote 'like this' rather than as `like this'.  Do the
same for comments and some text in our examples.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] maintcheck: remove a test that can't work for Automake-NG
Stefano Lattarini [Wed, 20 Jun 2012 14:39:44 +0000 (16:39 +0200)] 
[ng] maintcheck: remove a test that can't work for Automake-NG

* syntax-checks.mk (sc_tests_makefile_variable_order): Remove.  This
rule checked that all variables definitions were listed before rules
in the automake-generated Makefile.in files; but this invariant is not
guaranteed anymore by Automake-NG, and in fact it will break more and
more as our work proceeds.
(syntax_check_rules): Update.

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

* master:
  maintcheck: guard against obsolete $required entries
  tests: drop requirement 'makeinfo-html'; 'makeinfo' is enough
  tests: drop requirement 'texi2dvi-o'; 'texi2dvi' is enough
  texi: require Texinfo >= 4.9, related enhancements
  docs: it's not true that DISTCHECK_CONFIGURE_FLAGS is maintainer-reserved

+ Extra non-trivial edits:

* t/silent-texi.sh ($required): Simply use 'makeinfo and 'texi2dvi',
instead of (respectively) 'makeinfo-html' and 'texi2dvi-o'.
* t/texinfo21b.sh: Fix a minor typo in heading comments.
($required): Simply use 'makeinfo instead of 'makeinfo-html'
* lib/am/texibuild.am: Merge the changes done in the master branch to
the ".texi -> .dvi" and ".texi -> .pdf" recipes into the definition
of the '$(am__texibuild_dvi_or_pdf)' make function, as well as into ...
(%.dvi: %.texi), (%.pdf: %.texi): ... calls to that function into these
pattern rules.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agofixup: tests: special requirement 'makeinfo-html' removed from ./defs
Stefano Lattarini [Wed, 20 Jun 2012 12:23:28 +0000 (14:23 +0200)] 
fixup: tests: special requirement 'makeinfo-html' removed from ./defs

This should have ideally been part of earlier commit v1.12.1-93-g3c64d54.

* defs (makeinfo-html): Remove.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomaintcheck: guard against obsolete $required entries
Stefano Lattarini [Wed, 20 Jun 2012 11:49:18 +0000 (13:49 +0200)] 
maintcheck: guard against obsolete $required entries

* syntax-check.mk: Add rules guarding against the use of the
obsolete test requirements 'texi2dvi-o' and 'makeinfo-html'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: drop requirement 'makeinfo-html'; 'makeinfo' is enough
Stefano Lattarini [Wed, 20 Jun 2012 10:27:11 +0000 (12:27 +0200)] 
tests: drop requirement 'makeinfo-html'; 'makeinfo' is enough

* defs: Since we now require Texinfo 4.9 or later in the Automake
generated Makefiles, and since the '--html' option of makeinfo, as
well as its capability to generate HTML output, has been supported
since Texinfo 4.0 (according to the Texinfo NEWS file), the
requirement 'makeinfo-html' is obsolete -- the simpler requirement
'makeinfo' is enough.
* t/instdir-texi.sh ($required): Adjust by using simply 'makeinfo'
instead of 'makeinfo-html'.
* t/silent8.sh: Likewise.
* t/txinfo21.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: drop requirement 'texi2dvi-o'; 'texi2dvi' is enough
Stefano Lattarini [Wed, 20 Jun 2012 09:52:20 +0000 (11:52 +0200)] 
tests: drop requirement 'texi2dvi-o'; 'texi2dvi' is enough

* defs: Since we now require Texinfo 4.9 or later in the Automake
generated Makefiles, and since the '-o' option of texi2dvi has been
supported since Texinfo 4.1, the requirement 'texi2dvi-o' is
obsolete -- the simpler requirement 'texi2dvi' is enough.
* t/silent8.sh ($required): Adjust by using simply 'texi2dvi'
instead of 'texi2dvi-o'
* t/txinfo-no-clutter.sh: Likewise.
* t/txinfo13.sh: Likewise.
* t/txinfo23.sh: Likewise.
* t/txinfo24.sh: Likewise.
* t/txinfo25.sh: Likewise.
* t/txinfo28.sh: Likewise.
* t/txinfo33.sh: Likewise.
* t/vtexi4.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotexi: require Texinfo >= 4.9, related enhancements
Stefano Lattarini [Sun, 17 Jun 2012 10:23:18 +0000 (12:23 +0200)] 
texi: require Texinfo >= 4.9, related enhancements

We start passing the '--build-dir' option to the texi2dvi and texi2pdf
invocations done in our Texinfo-related rules.  The argument for this
option will be specific for each info_TEXINFOS entry, to work around a
texi2dvi bug that could otherwise cause racy failures in parallel make
builds:
<http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html>
That bug seems already fixed in the development version of texi2dvi,
though:
<http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00074.html>
so the details of our '--build-dir' usage can be revisited once we can
assume Texinfo 5.0 or later.

Since the '--build-dir' options has been only supported since Texinfo
4.9, we lose compatibility with all older Texinfo versions.

But we also get some real improvements.

First, the '--build-dir' option implies the '--tidy' option; this, like
the '--clean' option that we were formerly using, prevents cluttering of
the build directory with all the TeX and Texinfo auxiliary files and
build by-products, but, differently from '--clean', keeps them around
for later re-runs to use; this shortens the rebuild times considerably.

Second, the use of '--build-dir' also allows us to specify different
build directories for the PDF and DVI output, preventing the rules
building them from stomping on each other's feet when run in parallel.
This is demonstrated by the test cases 'txinfo-no-clutter.sh' and
'txinfo33.sh', which before this change used to fail when run with
MAKE="make -j4", but now succeed even in that case.

* NEWS: Update.
* lib/am/texibuilds.am: Do not try to avoid texi2dvi/texi2pdf option
'-o'; it has been supported since Texinfo 4.1, and we now require
Texinfo >= 4.9.  Remove an obsolete comment.  Modify calls to texi2dvi
and texi2pdf to use the '--build-dir' option, so that TeX auxiliary
files and build by-products for a 'foo.texi' input will be placed in
a 'foo.t2d' directory (for texi2dvi) or in a 'foo.t2p' directory (for
texi2pdf).
* automake.in (scan_texinfo_file): Greatly simplify the implementation,
since we don't need anymore to keep track of the TeX auxiliary files and
build by-products to clean.  Drop the '@CLEAN_FILES' part of the return
value.
(handle_texinfo_helper): Adjust the 'scan_texinfo_file()' call to its
new signature.  Append the "work directories" now created by texi2dvi
and texi2pdf invocation to the list of files/directories removed upon
"make mostlyclean".
* lib/am/texinfos.am: Update the cleaning rules (and comments)
accordingly.
* t/txinfo-no-clutter.sh: Minimal adjustment to avoid spurious failures.
* .gitignore: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] general: simpler workaround for CDPATH issues
Stefano Lattarini [Mon, 18 Jun 2012 14:17:17 +0000 (16:17 +0200)] 
[ng] general: simpler workaround for CDPATH issues

With this change, we also get rid of the $(am__cd) make variable.

* lib/am/header-vars.am (am__cd): Remove.
To ensure a CDPATH exported in the environment doesn't interfere with
our scripts and recipes, we can simply un-export it here (using the GNU
make "unexport" directive), rather than having to rely on $(am__cd) ...
* Makefile.am, automake.in, lib/am/configure.am, lib/am/distdir.am,
lib/am/header-vars.am, lib/am/inst-vars.am, lib/am/remake-hdr.am,
lib/am/tags.am, lib/am/texibuild.am, t/ax/distcheck-hook-m4.am: ... in
several places of these files.
* GNUmakefile, HACKING: Adjust.
* syntax-checks.mk (sc_cd_in_backquotes, sc_cd_relative_dir): Remove,
superseded by ...
(sc_no_am_cd): ... this new target, which has contrary semantics, and
looks *against* the use of the now-obsolete $(am__cd).
(syntax_check_rules): Adjust.

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

* ng/texinfo-work: (29 commits)
  [ng] texi: drop support for '.txi' and '.texinfo' suffixes
  [ng] coverage: texinfo silent rules with a subdir texinfo file
  [ng] tests: rename silent8.sh -> silent-texi.sh
  [ng] texi: remove some crufty code to support obsolete environment
  [ng] texi: move more code from automake to Makefile
  [ng] texi: "de-prettify" makeinfo command line
  [ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper()
  [ng] texi: simplify handle_texinfo_source by assuming '.info' suffix ...
  [ng] texi: move some more knowledge from automake to texi-spec.am
  [ng] texi: in texi-spec.am, assume suffix for info files is always '.info'
  [ng] automake: remove two unused variables from '&handle_texinfo_source'
  [ng] coverage: texinfo input files using @include directives
  [ng] texi: always look for mdate-sh in the build-aux directory ...
  [ng] refactor: more proper name for a subroutine in automake
  [ng] texi: drop a useless transform when processing texinfos.am
  [ng] texi: adjust names of vars used for silent rules support
  [ng] texi: drop transforms when reading texibuild.am
  [ng] texi: reorganize '.am' fragments even more
  [ng] texi: reorganize '.am' fragments a bit
  [ng] texi: reduce code duplication in output Makefile
  [ng] texi: refactoring in texibuild.am
  [ng] texi: reduce code duplication in texibuild.am
  [ng] texi: read 'texibuild' rules more verbatim
  [ng] texi: be sure to only emit generic pattern rules once
  [ng] texi: drop support for suffix-less info files
  [ng] texi: more target-specific variables use in '.info' build rules
  [ng] texi: reimplement '.info' build using target-specific variables
  [ng] texi: tweak rules for HTML generation to spawn only one shell
  [ng] texi: simplify by always assuming generic rules

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[bg] silent: simplify by taking advantage of GNU make semantics
Stefano Lattarini [Mon, 18 Jun 2012 09:33:00 +0000 (11:33 +0200)] 
[bg] silent: simplify by taking advantage of GNU make semantics

In particular, taking advantage of the fact that, in GNU make, command
line override of variables is propagated to recursive make invocations.

This change offers us a small but nice size reduction bot in Automake's
code and in the generated Makefiles.  It also improves the API to define
custom silent "tags", by turning it from:

    pkg_verbose = $(pkg_verbose_$(V))
    pkg_verbose_ = $(pkg_verbose_$(AM_DEFAULT_V))
    pkg_verbose_0 = @echo PKG-GEN $@;

to the slightly clearer:

    pkg_verbose = $(pkg_verbose/$(V))
    pkg_verbose/1 =
    pkg_verbose/0 = @echo PKG-GEN $@;

* NG-NEWS: Update.
* doc/automake-ng.texi (Automake Silent Rules): Update w.r.t. the
API for user-defined silent rules.
* automake.in: Simplify, by removing the indirections involving
$(AM_DEFAULT_VERBOSITY); some other changes and simplifications.
(verbose_private_var): Delete, its calls from &define_verbose_var
deleted (and those were its only calls).
* lib/am/header-vars.am: Define '$(V)' to 0 if it's not already
defined.
* m4/silent.m4: Initialize and AC_SUBST the variable 'V' directly,
instead of of the indirect 'AM_DEFAULT_VERBOSITY'.  Do not set nor
AC_SUBST the variable 'AM_BACKSLASH', it's not used anymore (and
hasn't been since out overhauling and simplification of the compile
rules).
* GNUmakefile: Simplify a little.
* t/silent6.sh, t/silent-configsite.sh: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
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 agodocs: it's not true that DISTCHECK_CONFIGURE_FLAGS is maintainer-reserved
Stefano Lattarini [Sat, 16 Jun 2012 07:16:53 +0000 (09:16 +0200)] 
docs: it's not true that DISTCHECK_CONFIGURE_FLAGS is maintainer-reserved

At least, not anymore since commit 'v1.11-372-g9760039' of 2001-06-10,
"distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS".  See also
automake bug#8784.

* doc/automake.texi (Flag Variables Ordering): Do not report
'DISTCHECK_CONFIGURE_FLAGS' as a "variables that are only useful
to the maintainer that has no user counterpart": now it is a
user-reserved variable, its maintainer-reserved counterpart
being 'AM_DISTCHECK_CONFIGURE_FLAGS' .

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>