]> git.ipfire.org Git - thirdparty/automake.git/log
thirdparty/automake.git
12 years ago[ng] dist: new API to specify formats of distribution tarballs ng/experimental/dist-work
Stefano Lattarini [Sun, 12 Aug 2012 18:58:17 +0000 (20:58 +0200)] 
[ng] dist: new API to specify formats of distribution tarballs

The API to specify the formats of distribution tarballs has been changed
completely.

Instead of using the various 'dist-*' automake options, the developer is
now expected to specify the default formats of its distribution tarballs
with the special variable AM_DIST_FORMATS; for example, where once would
have been:

    AM_INIT_AUTOMAKE([dist-bzip2 dist-zip])

now it must be:

    AM_DIST_FORMATS = gzip bzip2 zip

and similarly, where once would have been:

    AUTOMAKE_OPTIONS = no-dist-gzip dist-bzip2 dist-xz

now is it simply:

    AM_DIST_FORMATS = bzip2 xz

Similarly, The various 'dist-*' targets (dist-gzip, dist-xz, dist-lzip,
dist-bzip2 and dist-gz) has been removed.  If the user wants to generate
tarballs for formats not specified by the default AM_DIST_FORMATS, he can
simply override that variable dynamically:

    # Will generate a '.zip' archive and a '.tar.xz' archive, and not
    # further ones.
    make dist AM_DIST_FORMATS='zip xz'

This change is of course is totally backward incompatible, but the
enhanced flexibility and simplicity is worth it.  Not to mention that
the transition from the mainline Automake API to the new Automake-NG
one is trivial.

* NG-NEWS: Update.
* ng/automake-ng.texi: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] diag: new make function $(am.fatal)
Stefano Lattarini [Sun, 12 Aug 2012 18:42:02 +0000 (20:42 +0200)] 
[ng] diag: new make function $(am.fatal)

Mostly a preparatory patch for future changes.

* lib/am/header-vars.mk (am.fatal): New.
* automake.in (generate_makefile): Use in instead of $(error) in the
generated make code exiting for earlier errors.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: fixup: add 'dist' and 'dist-all' to AM_RECURSIVE_TARGETS
Stefano Lattarini [Sun, 12 Aug 2012 16:14:12 +0000 (18:14 +0200)] 
[ng] dist: fixup: add 'dist' and 'dist-all' to AM_RECURSIVE_TARGETS

* lib/am/distcheck.mk: Here.  That wasn't happing due to a botched
"ifdef", broken by some recent change (probably during the transition
from 'distcheck.am' to 'distcheck.mk').

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] distcheck: remove stale tarballs with 'rm -f', not 'rm -rf'
Stefano Lattarini [Sun, 12 Aug 2012 16:12:01 +0000 (18:12 +0200)] 
[ng] distcheck: remove stale tarballs with 'rm -f', not 'rm -rf'

* lib/am/distcheck.mk (distcheck): Here.  They are regular files
anyway.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: vars DIST_TARGETS and DIST_ARCHIVES are no more public
Stefano Lattarini [Sun, 12 Aug 2012 16:08:25 +0000 (18:08 +0200)] 
[ng] dist: vars DIST_TARGETS and DIST_ARCHIVES are no more public

Turn them into two internal variables.  This will clean up the
interface a bit, and make the new planned dist-related APIs (still
to be implemented) simpler to use.

* lib/am/distcheck.mk (DIST_TARGETS, DIST_ARCHIVES): Rename ...
(am.dist.default-targets, am.dist.default-archives): ... like
these, respectively.
(distcheck, dist, dist-all): Adjust.
* t/dist-formats.tap (nogzip): Likewise.
* NG-NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: refactor: reduce duplication in the 'dist-*' recipes
Stefano Lattarini [Sun, 12 Aug 2012 14:54:52 +0000 (16:54 +0200)] 
[ng] dist: refactor: reduce duplication in the 'dist-*' recipes

* lib/am/distcheck.mk: Here, with heavy refactorings, in particular
introducing ...
(am.dist.all-formats,
am.dist.all-targets,
am.dist.compress-cmd.gzip,
am.dist.uncompress-cmd.gzip,
am.dist.compress-cmd.bzip2,
am.dist.uncompress-cmd.bzip2,
am.dist.compress-cmd.lzip,
am.dist.uncompress-cmd.lzip
am.dist.compress-cmd.xz,
am.dist.uncompress-cmd.xz,
am.dist.create-cmd.zip,
am.dist.extract-cmd.zip): ... these new internal variables ...
(am.dist.create-archive-for-format.aux,
am.dist.create-archive-for-format,
am.dist.extract-archive-for-format.aux,
am.dist.extract-archive-for-format): ... and these new internal
make functions ...
(am.dist-gzip, am.dist-bzip2, am.dist-lzip, am.dist-xz,
am.dist.zip): ... and rewriting these rules as static-pattern
rules sharing the same recipe ...
(distcheck): ... and updating the recipe for this target.
* t/dist-formats.tap: Little adjustments for better usefulness
of verbose output when debugging.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] typofix: in comments in 'lib/am/distdir.mk'
Stefano Lattarini [Sun, 12 Aug 2012 13:14:06 +0000 (15:14 +0200)] 
[ng] typofix: in comments in 'lib/am/distdir.mk'

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] cosmetics: add an explicative comment
Stefano Lattarini [Sun, 12 Aug 2012 13:12:54 +0000 (15:12 +0200)] 
[ng] cosmetics: add an explicative comment

* lib/am/distdir.mk (am.dist.common-files): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tests: remove dead code from a test, fix a typo
Stefano Lattarini [Sun, 12 Aug 2012 13:02:33 +0000 (15:02 +0200)] 
[ng] tests: remove dead code from a test, fix a typo

* t/dist-formats.tap: Fix typo in a message: s/.tar.Z/.tar.xz/.
(have_compressor): Remove special handling of the 'compress' tool.
This is now useless, since we've removed support for '.tar.Z' tarballs
and thus care no more whether a 'compress' program is available or not.
Also, in the main code, one stray remaining reference to the 'shar'
program, that too useless now that we've removed support for '.shar.gz'
archives.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] cleanup: remove unused transform '%INSTALL-INFO%'
Stefano Lattarini [Sun, 12 Aug 2012 12:52:32 +0000 (14:52 +0200)] 
[ng] cleanup: remove unused transform '%INSTALL-INFO%'

* automake.in (preprocess_file): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] texi: verbatim include of rules for texinfo installation
Stefano Lattarini [Sun, 12 Aug 2012 12:09:34 +0000 (14:09 +0200)] 
[ng] texi: verbatim include of rules for texinfo installation

It tells whether the '.info' files must be installed by default (usually
yes, unless the "no-installinfo" automake option is used).  This is just
a preparatory change, in view of future ones.

* lib/am/texinfos.am: Move ...
* lib/am/texinfos.mk: ... here, with related adjustments.  Also ...
(info_TEXINFOS): ... initialize this to empty by default.
* lib/am/automake.in (handle_texinfo): Adjust and simplify accordingly.
* Makefile.am (dist_am_DATA): Adjust.
* t/txinfo10.sh: Remove, basically an obsolete grepping check.  We can
instead ...
* t/txinfo21.sh: ... enhance this semantic test to subsume and supersede
the removed one.
* t/override-conditional-1.sh: Adjust to avoid spurious failures.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] refactor: new internal make variable 'am.conf.no-installinfo'
Stefano Lattarini [Sun, 12 Aug 2012 11:56:01 +0000 (13:56 +0200)] 
[ng] refactor: new internal make variable 'am.conf.no-installinfo'

It tells whether the '.info' files must be installed by default (usually
yes, unless the "no-installinfo" automake option is used).  This is just
a preparatory change, in view of future ones.

* lib/am/automake.in (generate_makefile): Define it here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__can_run_installinfo -> am.texi.can-run-installinfo
Stefano Lattarini [Sun, 12 Aug 2012 11:54:29 +0000 (13:54 +0200)] 
[ng] rename: am__can_run_installinfo -> am.texi.can-run-installinfo

* lib/am/texinfos.am: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__create_installdir -> am.texi.create-installdir
Stefano Lattarini [Sun, 12 Aug 2012 11:23:06 +0000 (13:23 +0200)] 
[ng] rename: am__create_installdir -> am.texi.create-installdir

* lib/am/texinfos.am: Here.  And fix a related comment while at it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__info_insrc -> am.texi.info-in-srcdir
Stefano Lattarini [Sun, 12 Aug 2012 10:14:07 +0000 (12:14 +0200)] 
[ng] rename: am__info_insrc -> am.texi.info-in-srcdir

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] texi: prefer $(CURDIR) over `pwd` in recipes
Stefano Lattarini [Sun, 12 Aug 2012 10:12:22 +0000 (12:12 +0200)] 
[ng] texi: prefer $(CURDIR) over `pwd` in recipes

* lib/am/texibuild.mk: Here.  We can do so because the involved
recipes did not chdir before invoking `pwd`.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] texi: be more aware of possible failures in recipes
Stefano Lattarini [Sun, 12 Aug 2012 09:47:58 +0000 (11:47 +0200)] 
[ng] texi: be more aware of possible failures in recipes

* lib/am/texibuild.mk: Here, mostly by using "cmd1 && cmd2" or
"cmd1 || exit $?; cmd2" rather than "cmd1; cmd2" in some places.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] cosmetics: add a short explicative comment
Stefano Lattarini [Sun, 12 Aug 2012 09:36:34 +0000 (11:36 +0200)] 
[ng] cosmetics: add a short explicative comment

* lib/am/texibuild.mk (am.texi.build.html): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] texi: remove workaround for Texinfo 4.1
Stefano Lattarini [Sun, 12 Aug 2012 09:35:57 +0000 (11:35 +0200)] 
[ng] texi: remove workaround for Texinfo 4.1

* lib/am/texibuild.mk (am.texi.build.html): Here.  We require
Texinfo >= 4.9 anyway.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] texi: respect user-requested verbosity better
Stefano Lattarini [Sun, 12 Aug 2012 09:07:00 +0000 (11:07 +0200)] 
[ng] texi: respect user-requested verbosity better

* lib/am/texibuild.mk (am.texi.build.info): Here, by not hiding the
creation of the directory containing the target info when "make V=1"
is used (or "./configure --disable-silent-rules").

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] cosmetics: remove a stray empty line
Stefano Lattarini [Sun, 12 Aug 2012 09:04:31 +0000 (11:04 +0200)] 
[ng] cosmetics: remove a stray empty line

* lib/am/texibuild.mk (am.texi.build.dvi-or-pdf): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__texibuild_info -> am.texi.build.info
Stefano Lattarini [Sun, 12 Aug 2012 09:03:57 +0000 (11:03 +0200)] 
[ng] rename: am__texibuild_info -> am.texi.build.info

* lib/am/texibuild.mk: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__texibuild_html -> am.texi.build.html
Stefano Lattarini [Sun, 12 Aug 2012 09:02:21 +0000 (11:02 +0200)] 
[ng] rename: am__texibuild_html -> am.texi.build.html

* lib/am/texibuild.mk: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__texibuild_dvi_or_pdf -> am.texi.build.dvi-or-pdf
Stefano Lattarini [Sun, 12 Aug 2012 09:00:45 +0000 (11:00 +0200)] 
[ng] rename: am__texibuild_dvi_or_pdf -> am.texi.build.dvi-or-pdf

* lib/am/texibuild.mk: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tests: avoid spurious error with ctags from older Emacs and XEmacs
Stefano Lattarini [Sat, 11 Aug 2012 21:53:20 +0000 (23:53 +0200)] 
[ng] tests: avoid spurious error with ctags from older Emacs and XEmacs

* t/ctags.sh: Here.  Those ctags (from Emacs 22.3 and XEmacs 21.5)
apparently have problems grasping "#define" in header files; feed
them an inline function instead.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tests init: honour $ETAGS variable for etags requirement
Stefano Lattarini [Sat, 11 Aug 2012 21:24:55 +0000 (23:24 +0200)] 
[ng] tests init: honour $ETAGS variable for etags requirement

* t/ax/am-test-lib.sh (require_tool): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tests: allow overriding of etags/ctags programs
Stefano Lattarini [Sat, 11 Aug 2012 21:08:11 +0000 (23:08 +0200)] 
[ng] tests: allow overriding of etags/ctags programs

* t/ctags.sh, t/etags.sh: Here, for better coverage and debuggability.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tests: avoid a spurious failure on OpenIndiana
Stefano Lattarini [Sat, 11 Aug 2012 20:49:00 +0000 (22:49 +0200)] 
[ng] tests: avoid a spurious failure on OpenIndiana

* t/autodist.sh: Ensure that the 'install-sh' script has legit content,
because it's going to be used by the "make distdir" target on systems
lacking a decent 'install' program.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] contrib: rewrite and fix 'check-html' and 'recheck-html'
Stefano Lattarini [Sat, 11 Aug 2012 19:51:28 +0000 (21:51 +0200)] 
[ng] contrib: rewrite and fix 'check-html' and 'recheck-html'

That has actually been broken for some time, due to the changes
done in Automake-NG proper in the meantime.

* contrib/check-html.am (.log.html): Re-declare this suffix rule ...
(%.html: %.log): ... as a pattern rule.
(mostlyclean-check-html): Remove, instead ...
(MOSTLYCLEANFILES): ... appending to this variable.  Not only this
reduce the code size, but will give us resilience against possible
exceeded command line length limits for free.
(check-html, recheck-html): Rewrite as static pattern rules.  Fix
the recursive "make check" and "make recheck" invocation to override
TESTS, not TEST_LOGS (the latter override is not honoured anymore
by the new incarnation of the parallel-test rules).
* contrib/t/parallel-tests-html-recursive.sh: Adjust a little, by
initializing 'MOSTLYCLEANFILES' (to empty) in all the 'Makefile.am'
files that use 'check-html.am'.
* contrib/t/parallel-tests-html.sh: Likewise.  Also, since the
parallel-tests API does not allow command-line overriding of
TEST_LOGS anymore, stop doing that.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__config_distclean_files -> am.clean.config-files
Stefano Lattarini [Sat, 11 Aug 2012 19:13:43 +0000 (21:13 +0200)] 
[ng] rename: am__config_distclean_files -> am.clean.config-files

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: 'am--*' -> '.am/*' for internal Texinfo-related targets
Stefano Lattarini [Sat, 11 Aug 2012 19:05:42 +0000 (21:05 +0200)] 
[ng] rename: 'am--*' -> '.am/*' for internal Texinfo-related targets

* lib/am/texinfos.am: Here; these being the complete list of renames:

    am--install-dvi  -> .am/install-dvi
    am--install-ps   -> .am/install-ps
    am--install-pdf  -> .am/install-pdf
    am--install-info -> .am/install-info
    am--install-html -> .am/install-html

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] refactor: in declaration of Texinfo-related files to be cleaned
Stefano Lattarini [Sat, 11 Aug 2012 18:29:20 +0000 (20:29 +0200)] 
[ng] refactor: in declaration of Texinfo-related files to be cleaned

Less code, less variables, better locality.

* automake.in (handle_texinfo_helper ): Update '%clean_dirs' and
'%clean_files' from here, rather than returning the files to clean
as a triplet.
(handle_texinfo): Adjust and simplify.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] texi: less use of transforms in 'texinfos.am'
Stefano Lattarini [Sat, 11 Aug 2012 18:06:14 +0000 (20:06 +0200)] 
[ng] texi: less use of transforms in 'texinfos.am'

* automake.in (handle_texinfo): Drop the 'MOSTLYCLEAN', 'TEXICLEAN'
and 'MAINTCLEAN' transforms, instead adding directly to '%clean_dirs'
as appropriate.
* lib/am/texinfos.am: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] cleanup: drop a redundant %?FIRST% transform
Stefano Lattarini [Sat, 11 Aug 2012 17:36:08 +0000 (19:36 +0200)] 
[ng] cleanup: drop a redundant %?FIRST% transform

* lib/am/texinfos.am: Here: this file is only included one time
per Makefile by Automake.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] diagnostic: don't bother explicitly rejecting ansi2knr stuff
Stefano Lattarini [Sat, 11 Aug 2012 17:21:58 +0000 (19:21 +0200)] 
[ng] diagnostic: don't bother explicitly rejecting ansi2knr stuff

That is, fail through the usual avenues ("possibly undefined macro
'AM_C_PROTOTYPES', "option 'ansi2knr' not recognized") rather than
giving a special error message "automatic de-ANSI-fication support
has been removed".  Since the removal has taken place in Automake 1.12
already, people will have got used to it once Automake-NG gets stable
enough.

* lib/Automake/Options.pm (_process_option_list): Remove special
handling of 'ansi2knr' option.
* m4/protos.m4: Remove.
* Makefile.am (dist_automake_ac_DATA): Adjust.
* t/ansi2knr-no-more.sh: Remove.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] subdirs: merge $(RECURSIVE_CLEAN_TARGETS) into $(RECURSIVE_TARGETS)
Stefano Lattarini [Sat, 11 Aug 2012 16:59:35 +0000 (18:59 +0200)] 
[ng] subdirs: merge $(RECURSIVE_CLEAN_TARGETS) into $(RECURSIVE_TARGETS)

* lib/am/subdirs.mk: Here.  They had once been separated for historical
reasons, but such separation is not needed anymore today.
* NG-NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__recursive_targets -> am.recurs.all-targets
Stefano Lattarini [Sat, 11 Aug 2012 16:52:02 +0000 (18:52 +0200)] 
[ng] rename: am__recursive_targets -> am.recurs.all-targets

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] subdirs: verbatim include of relevant makefile fragment
Stefano Lattarini [Sat, 11 Aug 2012 16:18:18 +0000 (18:18 +0200)] 
[ng] subdirs: verbatim include of relevant makefile fragment

* lib/am/subdirs.am: Rename ...
* lib/am/subdirs.mk: ... like this.  Prefer '#' comments over
'##' ones.
* automake.in (handle_subdirs): Include it with the 'verbatim'
function rather than with the 'file_contents' one.
(generate_makefile): Move its call later.  This is actually required
to avoid spurious failures.
* Makefile.am (dist_am_DATA): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__extra_recursive_targets -> am.recurs.extra-targets
Stefano Lattarini [Sat, 11 Aug 2012 16:05:57 +0000 (18:05 +0200)] 
[ng] rename: am__extra_recursive_targets -> am.recurs.extra-targets

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: cosmetics: improve output from "make dist"
Stefano Lattarini [Sat, 11 Aug 2012 14:53:17 +0000 (16:53 +0200)] 
[ng] dist: cosmetics: improve output from "make dist"

* lib/am/distdir.mk: Here, ensuring that the parts of the 'distdir'
recipe that can be judged not to be needed are not even considered
nor outputted.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: don't ignore errors in fixing permissions of distributed files
Stefano Lattarini [Sat, 11 Aug 2012 14:45:42 +0000 (16:45 +0200)] 
[ng] dist: don't ignore errors in fixing permissions of distributed files

* lib/am/distdir.mk (distdir): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: cosmetic/clarity improvements
Stefano Lattarini [Sat, 11 Aug 2012 13:02:01 +0000 (15:02 +0200)] 
[ng] dist: cosmetic/clarity improvements

* lib/am/distdir.mk: Here, using the fact that this file is now included
verbatim and we can thus use GNU make constructs that would have confused
the Automake parser.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: fixup: honour DIST_SUBDIRS rather than SUBDIRS in conditionals
Stefano Lattarini [Sat, 11 Aug 2012 13:52:15 +0000 (15:52 +0200)] 
[ng] dist: fixup: honour DIST_SUBDIRS rather than SUBDIRS in conditionals

Regression introduced in recent patches, and revealed by a failure in
test 't/subpkg2.sh'.

* lib/am/distdir.mk: Here, throughout the file.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tests: fix spurious testsuite failures introduced by recent changes
Stefano Lattarini [Sat, 11 Aug 2012 13:18:34 +0000 (15:18 +0200)] 
[ng] tests: fix spurious testsuite failures introduced by recent changes

* t/distcom2.sh: Remove as basically obsolete.
* t/distcom3.sh: Use semantic checks rather than brittle grepping checks.
* t/hdr-vars-defined-once.sh: Likewise.
* t/location.sh: Remove some checks that would become too cumbersome to
run.
* t/targetclash.sh: Adjust to ensure the expected automake diagnostic is
actually triggered.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] distdir: verbatim inclusion of relevant makefile fragment
Stefano Lattarini [Sat, 11 Aug 2012 12:42:23 +0000 (14:42 +0200)] 
[ng] distdir: verbatim inclusion of relevant makefile fragment

* lib/am/distdir.am: Rename ...
* lib/am/distdir.mk: ... like here, with related adjustments.
* automake.in (handle_dist): Include it using the 'verbatim'
function, rather than the 'file_contents' one.
* Makefile.am (dist_am_DATA): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] cleanup: remove a now-unused variable
Stefano Lattarini [Sat, 11 Aug 2012 12:34:20 +0000 (14:34 +0200)] 
[ng] cleanup: remove a now-unused variable

* automake.in (handle_dist): Here: '%transform'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: less use of transforms, prefer make variables (4)
Stefano Lattarini [Sat, 11 Aug 2012 12:14:32 +0000 (14:14 +0200)] 
[ng] dist: less use of transforms, prefer make variables (4)

* automake.in (preprocess_file): Turn the '%CK-NEWS%' transform into ...
(generate_makefile): ... the '$(am.conf.check-news)' internal variable.
* lib/am/distdir.am (distdir): Adjust accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: less use of transforms, prefer make variables (3)
Stefano Lattarini [Sat, 11 Aug 2012 12:09:25 +0000 (14:09 +0200)] 
[ng] dist: less use of transforms, prefer make variables (3)

* automake.in (handle_dist): Turn the '%DIST-COMMON%' transform
into the 'am.dist.common-files.internal' internal variable.
* lib/am/distdir.am (distdir): Adjust accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: less use of transforms, prefer make variables (2)
Stefano Lattarini [Sat, 11 Aug 2012 12:05:43 +0000 (14:05 +0200)] 
[ng] dist: less use of transforms, prefer make variables (2)

* automake.in (handle_dist): Turn the '%DIST-TARGETS%' transform
into the 'am.dist.extra-targets' internal variable.
* lib/am/distdir.am (distdir): Adjust and simplify accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: less use of transforms, prefer make variables (1)
Stefano Lattarini [Sat, 11 Aug 2012 11:52:54 +0000 (13:52 +0200)] 
[ng] dist: less use of transforms, prefer make variables (1)

* automake.in (handle_dist): Turn the '%FILENAME_FILTER%' transform
into the 'am.dist.filename-filter' internal variable.
* lib/am/distdir.am (distdir): Adjust and simplify accordingly (and
improve an error message while at it).  In particular, this removed
the need for ...
(am.dist.skip-length-check): ... this variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tests: fix a spurious failure
Stefano Lattarini [Sat, 11 Aug 2012 11:51:21 +0000 (13:51 +0200)] 
[ng] tests: fix a spurious failure

* t/output11.sh: Here: some grepping checks had been broken by the
recent changes.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: enhance comments; prefer '#' over '##' where possible
Stefano Lattarini [Sat, 11 Aug 2012 11:36:43 +0000 (13:36 +0200)] 
[ng] dist: enhance comments; prefer '#' over '##' where possible

* lib/am/distdir.am: Here, throughout the file, to make the output
makefile more comprehensible.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__skip_mode_fix -> am.dist.skip-mode-fix
Stefano Lattarini [Sat, 11 Aug 2012 11:07:29 +0000 (13:07 +0200)] 
[ng] rename: am__skip_mode_fix -> am.dist.skip-mode-fix

* lib/am/distdir.am: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__skip_length_check -> am.dist.skip-length-check
Stefano Lattarini [Sat, 11 Aug 2012 11:05:48 +0000 (13:05 +0200)] 
[ng] rename: am__skip_length_check -> am.dist.skip-length-check

* lib/am/distdir.am: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: avoid few extra forks when descending in $(SUBDIRS)
Stefano Lattarini [Sat, 11 Aug 2012 10:21:41 +0000 (12:21 +0200)] 
[ng] dist: avoid few extra forks when descending in $(SUBDIRS)

* lib/am/distdir.am (distdir) [%?SUBDIRS%]: Here, by using
"make -C subdir distdir" rather than "(cd subdir && make distdir)".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: cosmetic fix of "make dist" output
Stefano Lattarini [Sat, 11 Aug 2012 09:56:35 +0000 (11:56 +0200)] 
[ng] dist: cosmetic fix of "make dist" output

* lib/am/distdir.am (distdir) [%?SUBDIRS%]: Here, by removing details
no one is (or should) actually be interested to see.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: fixup: remove stray references to obsolete archive formats
Stefano Lattarini [Sat, 11 Aug 2012 09:53:05 +0000 (11:53 +0200)] 
[ng] dist: fixup: remove stray references to obsolete archive formats

* automake.in (handle_dist): Here, to 'shar' and 'tarZ'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: fixup: run slower compressors first
Stefano Lattarini [Sat, 11 Aug 2012 09:45:57 +0000 (11:45 +0200)] 
[ng] dist: fixup: run slower compressors first

For better parallelism in "make dist".  This was already the case
for mainline Automake, but our recent changes to the dist-related
code in Automake-NG had broken that invariant.

* automake.in (handle_dist): Here, use 'unshift' rather than
'push' on '@archive_formats'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: move a comment to a more proper place
Stefano Lattarini [Sat, 11 Aug 2012 09:40:41 +0000 (11:40 +0200)] 
[ng] dist: move a comment to a more proper place

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: more verbatim inclusion of relevant makefile fragments
Stefano Lattarini [Sat, 11 Aug 2012 09:37:27 +0000 (11:37 +0200)] 
[ng] dist: more verbatim inclusion of relevant makefile fragments

* lib/am/distdir.am: Move most of the '%?TOPDIR_P%'-protected, verbatim
stuff (i.e., containing no Automake-time transforms) from here ...
* lib/am/distcheck.mk: ... to here, with related adjustments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__post_remove_distdir -> am.dist.post-remove-distdir
Stefano Lattarini [Sat, 11 Aug 2012 09:24:49 +0000 (11:24 +0200)] 
[ng] rename: am__post_remove_distdir -> am.dist.post-remove-distdir

* lib/am/distdir.am: Here.
* lib/am/distcheck.mk: And here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__remove_distdir -> am.dist.remove-distdir
Stefano Lattarini [Sat, 11 Aug 2012 09:22:12 +0000 (11:22 +0200)] 
[ng] rename: am__remove_distdir -> am.dist.remove-distdir

* lib/am/distdir.am: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: remove obsolete distribution formats
Stefano Lattarini [Sat, 11 Aug 2012 08:59:32 +0000 (10:59 +0200)] 
[ng] dist: remove obsolete distribution formats

Those formats being the 'shar' archive and the tar archive compressed
with 'compress'.  Support for them is kept in mainline Automake for
the sake of backward compatibility only, and modern software releases
should not use those formats anyway, so it's better if we just remove
them.

* NG-NEWS, doc/automake-ng.texi: Update.
* lib/Automake/Options.pm (_is_valid_easy_option): Remove 'dist-shar'
and 'dist-tarZ'.
(_process_option_list): Give a fatal error if one of those two options
is seen.
* lib/am/distdir.am (am.dist.ext.tarZ, am.dist.ext.shar): Remove these
variables.
(dist-tarZ, dist-shar): And these targets.
* lib/am/distcheck.mk (distcheck): Do not try to decompress '.shar.gz'
or '.tar.Z' archives: they won't be there anyway.
* t/dist-formats.tap: Adjust and simplify.
* t/dist-obsolete.sh: New test.
* t/lzma.sh: Remove, subsumed by it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dist: refactor handling of dist formats a little
Stefano Lattarini [Fri, 10 Aug 2012 23:41:26 +0000 (01:41 +0200)] 
[ng] dist: refactor handling of dist formats a little

* automake.in (handle_dist): Define list of default dist formats in the
new internal make variable 'am.dist.formats'.  Related adjustments.
(preprocess_file): Drop the following now-unused transforms: XZ, LZMA,
LZIP, BZIP2, COMPRESS, GZIP, SHAR, ZIP.
* lib/am/distdir.am: Drop any use of the removed transforms, throughout.
(DIST_TARGETS): Redefine in function of '$(am.dist.formats)'.
(.PHONY): Update in function of '$(am.dist.formats)'.
(am.dist.ext.gzip, am.dist.ext.bzip2, am.dist.ext.xz, am.dist.ext.lzip,
am.dist.ext.tarZ, am.dist.ext.shar, am.dist.ext.zip): New internal
variables.
(DIST_ARCHIVES): Redefine in function of them and of '$(am.dist.formats)'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am.write-list-of-distfiles -> am.dist.write-filelist
Stefano Lattarini [Fri, 10 Aug 2012 17:47:37 +0000 (19:47 +0200)] 
[ng] rename: am.write-list-of-distfiles -> am.dist.write-filelist

* lib/am/distdir.am: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am.mkdir-for-dist -> am.dist.xmkdir
Stefano Lattarini [Fri, 10 Aug 2012 17:46:24 +0000 (19:46 +0200)] 
[ng] rename: am.mkdir-for-dist -> am.dist.xmkdir

* lib/am/distdir.am: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] distcheck: include it as a verbatim makefile fragment
Stefano Lattarini [Fri, 10 Aug 2012 17:07:04 +0000 (19:07 +0200)] 
[ng] distcheck: include it as a verbatim makefile fragment

* lib/am/distcheck.am: Rename ...
* lib/am/distcheck.mk: ... like this, and adjust to use GNU
make conditionals rather than Automake ones, and to allow for
user overrides of the '$(distcleancheck_listfiles)' variable.
Fix some comments while at it.
* automake.in (handle_dist): Include it suing the 'verbatim'
function.
* Makefile.am (dist_am_DATA): Adjust.
* t/distcheck-configure-flags-am.sh: Remove obsolete grepping
checks, that would cause the test to fails spuriously.
* t/distcheck-configure-flags.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] distcheck: move in its own '*.am' fragment
Stefano Lattarini [Fri, 10 Aug 2012 16:41:09 +0000 (18:41 +0200)] 
[ng] distcheck: move in its own '*.am' fragment

* lib/am/distdir.am: From here ...
* lib/am/distcheck.am: ... to here.  That is especially useful because
all of the 'distcheck' target has to be protected by a if '%?TOPDIR_P%'
conditional (since the 'distcheck' target must only be present in the
top-level makefile), so that we can now remove this overly long
conditional from this fragment ...
* automake.in (handle_dist): ... and simply limiting the inclusion
of it to when '$reldir' is '.'.
* Makefile.am (dist_am_DATA): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Fri, 10 Aug 2012 15:44:57 +0000 (17:44 +0200)] 
Merge branch 'master' into ng/master

* master:
  automake: remove an unused local variable
  distcheck: more resilient against possible failures
  cleanup: remove almost-unused global var 'am_relative_dir'

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tests: reorganize gettext tests a bit
Stefano Lattarini [Fri, 10 Aug 2012 15:34:46 +0000 (17:34 +0200)] 
[ng] tests: reorganize gettext tests a bit

* t/gettext.sh: Move checks about PR/381 ...
* t/gettext-pr381.sh: ... to this new test.
* t/gettext.sh: Move checks about config.rpath requirement ...
* t/gettext-config-rpath.sh: ... to this new test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tests: avoid spurious failure in a gettext test
Stefano Lattarini [Fri, 10 Aug 2012 15:15:54 +0000 (17:15 +0200)] 
[ng] tests: avoid spurious failure in a gettext test

* t/gettext2.sh: Here, remove obsolete grepping checks in favor
of more modern ones.
* t/gettext.sh: Likewise.  This doesn't fix any failure, but
makes the test more reliable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tests: adjust weaknesses in the gettext tests
Stefano Lattarini [Fri, 10 Aug 2012 14:50:32 +0000 (16:50 +0200)] 
[ng] tests: adjust weaknesses in the gettext tests

* t/gettext-macros.sh (m4/mk-dirp.m4): Define 'AM_PROG_MKDIR_P' rather
than 'AM_MKDIR_P', and in doing so, use 'AC_PROG_MKDIR_P' rather than
'AC_MKDIR_P'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 10 Aug 2012 14:51:55 +0000 (16:51 +0200)] 
Merge branch 'maint'

* maint:
  automake: remove an unused local variable
  distcheck: more resilient against possible failures
  cleanup: remove almost-unused global var 'am_relative_dir'

12 years agoautomake: remove an unused local variable
Stefano Lattarini [Fri, 10 Aug 2012 14:25:00 +0000 (16:25 +0200)] 
automake: remove an unused local variable

* automake.in (handle_dist): Here, the '$extra_dist' variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agodistcheck: more resilient against possible failures
Stefano Lattarini [Fri, 10 Aug 2012 14:11:04 +0000 (16:11 +0200)] 
distcheck: more resilient against possible failures

* lib/am/distdir.am (distcheck): Ensure that a failure in the commands
making the just-extracted source tree read-only cause the recipe to fail.
While at it, save a fork by creating the '_build' and '_inst' subdir
with a single mkdir invocation.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agocleanup: remove almost-unused global var 'am_relative_dir'
Stefano Lattarini [Mon, 30 Jul 2012 19:02:59 +0000 (21:02 +0200)] 
cleanup: remove almost-unused global var 'am_relative_dir'

Cherry picked from commit v1.12.2-741-g53b5d11 of Automake-NG.

* automake.in ($am_relative_dir): Delete, it was only used once ...
(generate_makefile): ... in here, so it's simpler to inline its
expansion.
(initialize_per_input): Don't reset the deleted variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] distcheck: --with-included-gettext: with a variable, not a transform
Stefano Lattarini [Fri, 10 Aug 2012 14:29:58 +0000 (16:29 +0200)] 
[ng] distcheck: --with-included-gettext: with a variable, not a transform

This is mostly a preparatory refactoring in view of future changes.

* automake.in (handle_dist): Define the new internal variable
'am.dist.handle-gettext' to "yes" if the package uses gettext,
to the empty string otherwise.  This takes over the role of the
transform 'GETTEXT', which has thus been removed.
* lib/am/distdir.am (distcheck): Adjust to rely on the new variable
instead than of the removed transform.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] disthook: with an internal variable, not a transform
Stefano Lattarini [Fri, 10 Aug 2012 14:00:42 +0000 (16:00 +0200)] 
[ng] disthook: with an internal variable, not a transform

This is mostly a preparatory refactoring in view of future changes.

* automake.in (handle_dist): Define the internal variable
'am.dist.handle-distcheck-hook' to "yes" if a user-defined
'distcheck-hook' rule, to the empty string otherwise.  This
take over the role of the transform 'DISTCHECK-HOOK', which
has thus been removed.
* lib/am/distdir.am (distcheck): Adjust to rely on the new
variable instead than of the removed transform.
* t/distcheck-hook.sh: Remove obsolete or obsolescent grepping
checks.
* t/distcheck-hook2.sh: Likewise.

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

* master:
  cleanup: remove two almost-unused global variables: {am,in}_file_name
  cleanup: remove almost-unused global var 'topsrcdir'
  automake: remove an unused variable
  tests: make a test script more semantic
  tests: remove an obsolete, no-op test script
  tests: remove an obsolete test script

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'ng/no-maintmode' into ng/master
Stefano Lattarini [Fri, 10 Aug 2012 11:11:07 +0000 (13:11 +0200)] 
Merge branch 'ng/no-maintmode' into ng/master

* ng/no-maintmode:
  [ng] maintainer-mode: remove it altogether

12 years agoMerge branch 'ng/inst-work' into ng/master
Stefano Lattarini [Fri, 10 Aug 2012 11:10:59 +0000 (13:10 +0200)] 
Merge branch 'ng/inst-work' into ng/master

* ng/inst-work:
  [ng] uninstall: refactor, more processing delegated to GNU make
  [ng] uninstall: reimplement various recipes using more GNU make features
  [ng] am.xargs-map: can pass further arguments to the mapped function
  [ng] refactor: remove all uses of $(am__nobase_strip{,_setup})
  [ng] refactor: remove all uses of '$(am__strip_dir)'

12 years ago[ng] dejagnu: include verbatim
Stefano Lattarini [Fri, 10 Aug 2012 11:02:29 +0000 (13:02 +0200)] 
[ng] dejagnu: include verbatim

* lib/am/dejagnu.am: Rename ...
* lib/am/dejagnu.mk: ... like this, and rewrite partially to make it
readable verbatim.
* Makefile.am (dist_am_DATA): Adjust.
* automake.in (handle_tests): When DejaGNU support is needed, include
'dejagnu.mk' verbatim in the output Makefile.
* t/dejagnu2.sh: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] dejagnu: include verbatim
Stefano Lattarini [Fri, 10 Aug 2012 10:57:04 +0000 (12:57 +0200)] 
[ng] dejagnu: include verbatim

* lib/am/dejagnu.am: Rename ...
* lib/am/dejagnu.mk: ... like this, and rewrite partially to make it
readable verbatim.
* Makefile.am (dist_am_DATA): Adjust.
* automake.in (handle_tests): When DejaGNU support is needed, include
'dejagnu.mk' verbatim in the output Makefile.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 10 Aug 2012 10:51:40 +0000 (12:51 +0200)] 
Merge branch 'maint'

* maint:
  cleanup: remove two almost-unused global variables: {am,in}_file_name
  cleanup: remove almost-unused global var 'topsrcdir'
  automake: remove an unused variable
  tests: make a test script more semantic
  tests: remove an obsolete, no-op test script
  tests: remove an obsolete test script

12 years ago[ng] refactor: drop 'HOST', 'BUILD' and 'TARGET' transforms
Stefano Lattarini [Fri, 10 Aug 2012 09:15:15 +0000 (11:15 +0200)] 
[ng] refactor: drop 'HOST', 'BUILD' and 'TARGET' transforms

Instead, use the new make variables $(am.conf.host-triplet),
$(am.conf.build-triplet) and $(am.conf.host-triplet) are defined.

* automake.in (preprocess_file): Drop 'HOST', 'BUILD' and 'TARGET'
transforms.  Their role taken over ...
(generate_makefile): ... by the new variables 'am.conf.host-triplet',
'am.conf.build-triplet' and 'am.conf.target-triplet' defined here.
* lib/am/dejagnu.am: Adjust.
* t/triplet.sh: New test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agocleanup: remove two almost-unused global variables: {am,in}_file_name
Stefano Lattarini [Mon, 30 Jul 2012 18:30:23 +0000 (20:30 +0200)] 
cleanup: remove two almost-unused global variables: {am,in}_file_name

Cherry picked from commit v1.12.2-739-gbf2a8b0 of Automake-NG.

* automake.in ($am_file_name, $in_file_name): Delete these, which were
used only in the 'read_main_am_file' subroutine; instead ...
(read_main_am_file): ... modify it to only work from the '$makefile_am'
argument (which it was already receiving), and the new '$makefile_in'
argument, which is now passed to it ...
(generate_makefile): ... from here.
(initialize_per_input): Don't reset the two deleted variables anymore.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agocleanup: remove almost-unused global var 'topsrcdir'
Stefano Lattarini [Mon, 30 Jul 2012 18:34:12 +0000 (20:34 +0200)] 
cleanup: remove almost-unused global var 'topsrcdir'

Cherry picked from commit v1.12.2-740-ga7f24eb in Automake-NG.

* automake.in ($topsrcdir): Delete, it was only used once ...
(handle_LIBOBJS_or_ALLOCA): ... in here, so it's simpler to inline
its expansion.  Improve formatting of immediately surrounding code
a little while we are at it.
(initialize_per_input): Don't reset the deleted variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoautomake: remove an unused variable
Stefano Lattarini [Fri, 10 Aug 2012 08:58:53 +0000 (10:58 +0200)] 
automake: remove an unused variable

* automake.in ($canonical_location): This.
(scan_autoconf_traces): Don't initialize it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tags: rewrite to be included verbatim
Stefano Lattarini [Thu, 9 Aug 2012 22:43:17 +0000 (00:43 +0200)] 
[ng] tags: rewrite to be included verbatim

* lib/am/tags.am: Moved ...
* lib/am/tags.mk: ... here, rewrite to be included verbatim, reformatted,
and enhanced to take over the role of ...
* automake.in (handle_tags): ... this function as well, which has thus
been removed.
(generate_makefile): Call the removed function no more.  Include 'tags.mk'
verbatim in the generated Makefile.
* Makefile.am (dist_am_DATA): Adjust.
* t/tags.sh: This weak grepping test is broken by the other changes done
here; so remove it, adding ...
* t/tags-id.sh: ... this in its place, which is more semantic, i.e.,
operated by actually running the 'ID' target.
* t/tags2.sh: Remove as obsolete.
* t/location.sh: Adjust to avoid spurious errors.
* t/targetclash.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] vars: new variable $(am.conf.is-topdir)
Stefano Lattarini [Thu, 9 Aug 2012 22:13:10 +0000 (00:13 +0200)] 
[ng] vars: new variable $(am.conf.is-topdir)

* automake.in (generate_makefile): Define that variable to "yes" if the
Makefile being currently generated is in the top-level directory, define
it to the empty string otherwise.  This offers a way (alternative to the
'%?TOPDIR_P%' transform) to determine whether a recipe is being executed
in the top-level directory or not.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tags: move yet more processing to GNU make
Stefano Lattarini [Thu, 9 Aug 2012 18:50:55 +0000 (20:50 +0200)] 
[ng] tags: move yet more processing to GNU make

This will also simplify future changes aimed at making the current
'tags.am' makefile fragment included more "verbatim".

* lib/am/tags.am (am.tags.include-option): New internal variable, the
include-like option used by the $(EATGS) problem.  This must be
determined dynamically because Exuberant Ctags wants '--etags-include'
while GNU Etags wants '--include'.
(am.tags.subfiles): New, TAGS files in $(SUBDIRS) entries (if any)
that must be included in the top-level TAGS file.
(tags-am): Use them, and simplify accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tags: drop support for pre-5.6 exuberant ctags
Stefano Lattarini [Thu, 9 Aug 2012 18:14:16 +0000 (20:14 +0200)] 
[ng] tags: drop support for pre-5.6 exuberant ctags

Exuberant Ctags before that version (release in 2006) could
fail to create TAGS files when no files are supplied, despite
any '--etags-include' option.  This required the addition of
a workaround ...

* lib/am/tags.am (tags-am): ... here, which can now be removed.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tags: tiny code duplication removal
Stefano Lattarini [Thu, 9 Aug 2012 17:56:39 +0000 (19:56 +0200)] 
[ng] tags: tiny code duplication removal

* lib/am/tags.am (tags-am): Here, using 'CMD ${1+"$@"}' instead of
'if test $# -eq 0; then CMD; else CMD "$@"; fi'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tags: use more GNU make features
Stefano Lattarini [Thu, 9 Aug 2012 17:31:35 +0000 (19:31 +0200)] 
[ng] tags: use more GNU make features

* lib/am/tags.am (am__uniquify_input, am__define_uniq_tagged_files):
Remove, their role taken over by ...
(am.tags.files.uniq): ... this new (memoized) variable.
All rules adjusted.
(tags-am): Use $(CURDIR) instead of `pwd` to compute the absolute
path of the current working directory.
(GTAGS): Use $(abs_top_builddir) instead of `cd $(top_builddir) && pwd`
to compute the absolute path of the top-level build directory.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] tags: enhance testsuite coverage for etags/ctags
Stefano Lattarini [Thu, 9 Aug 2012 20:18:28 +0000 (22:18 +0200)] 
[ng] tags: enhance testsuite coverage for etags/ctags

* t/tagsub.sh: Rename ...
* t/etags.sh: ... like this, and extend greatly.
* t/ctags.sh: New test (vi-style ctags).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] rename: am__tagged_files -> am.tags.files
Stefano Lattarini [Thu, 9 Aug 2012 16:45:46 +0000 (18:45 +0200)] 
[ng] rename: am__tagged_files -> am.tags.files

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] maintainer-mode: remove it altogether
Stefano Lattarini [Thu, 9 Aug 2012 10:15:01 +0000 (12:15 +0200)] 
[ng] maintainer-mode: remove it altogether

The best explanation for this move is given by excerpts from the
Automake manual itself:

    Several years ago François Pinard pointed out several arguments
    against this AM_MAINTAINER_MODE macro.  Most of them relate to
    insecurity.  By removing dependencies you get non-dependable builds:
    changes to sources files can have no effect on generated files and
    this can be very confusing when unnoticed.  He adds that security
    shouldn't be reserved to maintainers (what '--enable-maintainer-mode'
    suggests), on the contrary.  If one user has to modify a Makefile.am,
    then either Makefile.in should be updated or a error should be output
    (this is what Automake uses the 'missing' script for) but the last
    thing you want is that nothing happens and the user doesn't notice
    it (which is exactly what happens when rebuild rules are disabled by
    AM_MAINTAINER_MODE).

    Jim Meyering, the inventor of the AM_MAINTAINER_MODE macro was swayed
    by François's arguments, and got rid of AM_MAINTAINER_MODE in all of
    his packages.

Since in Automake-NG we are breaking backward-compatibility in several
ways already, this is a good occasion to get rid of another obsolescent,
historical-reasons-only, more-dangerous-than-useful feature.

Admittedly, the manual went on saying:

    Still many people continue to use AM_MAINTAINER_MODE, because it
    helps them working on projects where all files are kept under
    version control, and because missing isn't enough if you have the
    wrong version of the tools.

But then, the right solutions for using lies not in the use of the
brittle AM_MAINTAINER_MODE macro; such solutions are indeed already
explained in another section of the manual (in the section "CVS and
generated files"):

    In distributed development, developers are likely to have different
    version of the maintainer tools installed.  In this case rebuilds
    triggered by timestamp lossage will lead to spurious changes to
    generated files.  There are some popular solutions to this:

    - All developers should use the same versions, so that the rebuilt
      files are identical to files in CVS.  (This starts to be difficult
      when each project you work on uses different versions).

    - Or people use a script to fix the timestamp after a checkout (the
      GCC folks have such a script).

The use of such a "timestamp-fixing" script is also suggested earlier
in the section, in the discussion about the merits and limits of the
'missing' script.

* NG-NEWS: Update.
* doc/automake-ng.texi: Likewise; among the other things ...
(maintainer-mode): ... rename this node ...
(maintainer tools): ... like this.
* m4/maintainer.m4: Delete.
* Makefile.am (dist_automake_ac_DATA): Delete.
* automake.in ($seen_maint_mode): Remove this global variable.
(scan_autoconf_trace): Don't trace 'AM_MAINTAINER_MODE'.
(read_am_file): Don't special-handle '@MAINT@' substitutions;
which were an anachronism anyway, according to pre-existing
comments.
(preprocess_file): Drop 'MAINTAINER-MODE' transform.
* lib/am/configure.am: Remove all uses of the %MAINTAINER-MODE%
transform.
* lib/am/remake-hdr.am: Likewise.
* lib/am/texi-vars.am: Likewise.
* lib/am/lex.am, lib/am/yacc.am: Likewise, and simplify dropping
the definition and use of (respectively) '$(am.lex.maybe-skip)'
and '$(am.yacc.maybe-skip)'.
* t/condlib.sh (configure.ac): Drop AM_MAINTAINER_MODE use.
* t/flavor.sh: Likewise, and drop '--enable-maintainer-mode'
from the './configure' invocation.
* t/lex-pr204.sh: Remove as obsolete.
* t/yacc-pr204.sh: Likewise.
* t/maintmode-configure-msg.sh: Likewise.
* t/mmode.sh: Likewise.
* t/mmodely.sh: Likewise.
* t/remake5.sh: Likewise.
* t/lex-nodist.sh: Fix header comments to account for some of
the deleted tests.
* t/yacc-nodist.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] uninstall: refactor, more processing delegated to GNU make
Stefano Lattarini [Wed, 8 Aug 2012 21:09:06 +0000 (23:09 +0200)] 
[ng] uninstall: refactor, more processing delegated to GNU make

* lib/am/header-vars.mk (am.chars.space, am.chars.tab): New variables,
defined respectively to a literal white space characters and a literal
tabulation character.
(am.util.whitespace-escape): New function, backslash-escape whitespace
characters in the given string.
(am.util.file-exists): New function, tell whether the given argument
is an existing file; it does so coping correctly with whitespaces and
wildcard metacharacters as well, to be usable with paths containing
references to $(DESTDIR).
(am.uninst.cmd.aux): Re-implement using the new $(am.util.file-exists)
function.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] uninstall: reimplement various recipes using more GNU make features
Stefano Lattarini [Wed, 8 Aug 2012 17:45:06 +0000 (19:45 +0200)] 
[ng] uninstall: reimplement various recipes using more GNU make features

This change likely introduces subtle semantic changes in corner cases
and tricky situation.  Given the simplifications and improved uniformity
it offers, we consider that completely acceptable.

With this change, the test 't/instmany-python.sh' passes once again.

* lib/am/header-vars.mk (am.uninst.cmd): New private make function.
(am.uninst.cmd.aux): Likewise, used internally by the above (and
to be considered an implementation detail of it).
(am__uninstall_files_from_dir): Delete, no more needed.
* lib/am/data.am: Rewrite the uninstall recipe(s) to take advantage
of $(am.uninst.cmd).
* lib/am/libs.am: Likewise.
* lib/am/lisp.am: Likewise.
* lib/am/mans.am: Likewise.
* lib/am/python.am: Likewise.
* lib/am/progs.am: Likewise.
* lib/am/scripts.am: Likewise.
* lib/am/texinfos.am: Likewise (and also of other unrelated GNU make
features while we are at it).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] am.xargs-map: can pass further arguments to the mapped function
Stefano Lattarini [Wed, 8 Aug 2012 15:15:31 +0000 (17:15 +0200)] 
[ng] am.xargs-map: can pass further arguments to the mapped function

This is just a preparatory refactoring that will be needed by future
changes.

* lib/am/header-vars.mk (am.xargs-map): Improve.
* t/am-xargs-map.sh: Enhance to check the enhanced behaviour.

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