]> git.ipfire.org Git - thirdparty/automake.git/log
thirdparty/automake.git
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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 years ago[ng] refactor: remove all uses of $(am__nobase_strip{,_setup})
Stefano Lattarini [Wed, 8 Aug 2012 13:21:46 +0000 (15:21 +0200)] 
[ng] refactor: remove all uses of $(am__nobase_strip{,_setup})

Prefer using GNU make built-ins $(patsubst) and $(notdir) instead.
This entails a partial or complete rewrites of several install and/or
uninstall rules.

This change doesn't offer any serious simplification, being just a
step in the general direction of moving more non-trivial processing
to GNU make.  The change actually slows down some install/uninstall
rules, but leave the touched codebase simpler and more malleable by
future changes; performance improvements can be re-introduced later,
this time with more use of GNU make features rather than sed+awk
chicanery.

This change also breaks the test 't/instmany-python.sh'; no big
deal though, as that will be fixed again soon by further refactoring.

* lib/am/data.am: Rewritten some install/uninstall rules to avoid
using '$(am__nobase_strip)' and '$(am__nobase_strip_setup)'.
* lib/am/libs.am: Likewise.
* lib/am/lisp.am: Likewise.
* lib/am/python.am: Likewise.
* lib/am/scripts.am: Likewise.  Also drop some performance optimization
that, albeit useful and legitimate, were making the code too much
complicated to work on.
(am__nobase_strip): Remove, no more used.
(am__nobase_strip_setup): Likewise, its only remaining use inlined ...
(am__nobase_list): ... here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: make a test script more semantic
Stefano Lattarini [Wed, 8 Aug 2012 17:18:44 +0000 (19:18 +0200)] 
tests: make a test script more semantic

This is mostly useful for Automake-NG, that is heavily overhauling the
generated Makefiles and thus is prone to break grepping checks (which
can sometimes end up causing false negatives in the testsuite, sadly).
But this is not a reason not to strengthen the test for mainline
Automake as well.

* t/noinstdir.sh: Add semantic checks.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: remove an obsolete, no-op test script
Stefano Lattarini [Wed, 8 Aug 2012 17:08:11 +0000 (19:08 +0200)] 
tests: remove an obsolete, no-op test script

* t/info.sh: This: it tried to operate by checking the contents of the
variable '$(INFOS)', but that is not even defined (and probably has been
obsolete for quite a long time).  Since other tests already do thorough
testing of the Texinfo support, just remove this test.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: remove an obsolete test script
Stefano Lattarini [Wed, 8 Aug 2012 17:02:13 +0000 (19:02 +0200)] 
tests: remove an obsolete test script

* t/scripts.sh: This: it used to check that the 'AC_PROG_INSTALL' macro
was not uselessly required, but today that macro is AC_REQUIRE'd by
'AM_INIT_AUTOMAKE' anyway, so that the test is no more significant.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactor: remove all uses of '$(am__strip_dir)'
Stefano Lattarini [Tue, 7 Aug 2012 22:21:39 +0000 (00:21 +0200)] 
[ng] refactor: remove all uses of '$(am__strip_dir)'

Prefer using GNU make built-in '$(notdir)' instead.  This change doesn't
offer any serious simplification, but is just a step in the general
direction of moving more non-trivial processing to GNU make.

* lib/am/lib.am: Rewritten some install/uninstall rules to avoid
using '$(am__strip_dir)'.
* lib/am/lisp.am: Likewise.
* lib/am/ltlib.am: Likewise.
* lib/am/python.am: Likewise.
* lib/am/texinfos.am: Likewise.
* lib/am/header-vars.mk (am__strip_dir): Remove.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactor: merge inst-vars.am into header-vars.mk
Stefano Lattarini [Tue, 7 Aug 2012 22:01:29 +0000 (00:01 +0200)] 
[ng] refactor: merge inst-vars.am into header-vars.mk

This will simplify possible future refactorings.  Given the small size
of 'inst-vars.am', and the fact that the content of a verbatim-included
makefile fragment is included in the distribution tarball only once,
this change doesn't increase the size of distribution tarballs in any
appreciable way, even if the variables once defined in 'inst-vars.am'
aren't really needed.

* lib/am/inst-vars.am: Remove, merged ...
* lib/am/header-vars.mk: ... in here, with all '##' comments turned
into '#' comments, and (few of them) slightly improved with the
addition of "FIXME" remarks.
* Makefile.am (dist_am_DATA): Adjust.
* lib/am/data.am: Include the 'inst-vars.am' file explicitly no more.
* lib/am/libs.am:: Likewise.
* lib/am/lisp.am:: Likewise.
* lib/am/ltlib.am:: Likewise.
* lib/am/mans.am:: Likewise.
* lib/am/python.am:: Likewise.
* lib/am/scripts.am:: Likewise.
* lib/am/texinfos.am:: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: remove few VPATH rewrite workarounds
Stefano Lattarini [Tue, 7 Aug 2012 16:51:31 +0000 (18:51 +0200)] 
[ng] cleanup: remove few VPATH rewrite workarounds

They are not needed by GNU make, which performs no implicit VPATH
rewrites in its recipes.

* lib/am/lisp.am (install-%DIR%LISP): No need to "correct" possible
VPATH rewrites: GNU makes doesn't do them.  Accordingly, ...
* lib/am/inst-vars.am (am__vpath_adj_setup, am__vpath_adj): ... these
two  variables are no more needed: remove them.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] elisp: use more GNU make features in recipes
Stefano Lattarini [Tue, 7 Aug 2012 16:35:54 +0000 (18:35 +0200)] 
[ng] elisp: use more GNU make features in recipes

* lib/am/lisp.am (%.elc: %.el): Here, with the help of ...
[%?FIRST%] (am.elisp.includes): ... this new internal variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoelisp: prefer pattern rules to suffix rules
Stefano Lattarini [Mon, 6 Aug 2012 08:04:56 +0000 (10:04 +0200)] 
elisp: prefer pattern rules to suffix rules

* lib/am/lisp.am: Here, turning ...
(.el.elc): ... this ...
(%elc: %.el): ... into this.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Sun, 5 Aug 2012 16:24:32 +0000 (18:24 +0200)] 
Merge branch 'master' into ng/master

* master: (23 commits)
  tests: avoid spurious failures with older Texinfo
  tests: avoid tons of spurious failures on NetBSD
  runtest: avoid spurious failures on NetBSD
  news: dependency tracking for Portland Group Compilers is now supported
  tests: cater to OpenSolaris 'zip'
  tests: fix a spurious XPASS on OpenIndiana
  tests: avoid spurious failure of 't/vala-vapi.sh' on OpenIndiana
  tests: avoid spurious failure of 't/uninstall-fail.sh' on OpenIndiana
  tests: reimplement wrappers for automake and aclocal in perl
  tests: work around a ksh bug w.r.t. ${1+"$@"}
  news: document all the recent elisp-related changes and improvements
  coverage: byte-compiling elisp files in different subdirectories
  elisp: honour AM_ELCFLAFS and ELCFLAGS in byte-compilation
  elisp: --batch implies -q, remove -q
  elisp: support elisp files in subdirectories properly
  elisp: simplify suffix rules using emacs '-L' option
  elisp: no need to "absolutize" $(srcdir) and $(builddir) ...
  elisp: prefer $(builddir) files over $(srcdir) ones
  elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)
  coverage: elisp path contains $(srcdir) and $(builddir)
  ...

+ Extra non-trivial edits:
* lib/am/lisp.am (am.clean.normal.f): Add 'elc-stamp' no more.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Sun, 5 Aug 2012 15:45:07 +0000 (17:45 +0200)] 
Merge branch 'maint'

* maint:
  tests: avoid spurious failures with older Texinfo
  tests: avoid tons of spurious failures on NetBSD
  runtest: avoid spurious failures on NetBSD
  news: dependency tracking for Portland Group Compilers is now supported

13 years agotests: avoid spurious failures with older Texinfo
Stefano Lattarini [Sun, 5 Aug 2012 15:11:51 +0000 (17:11 +0200)] 
tests: avoid spurious failures with older Texinfo

* t/distcheck-override-infodir.sh (main.texi): Add explicit calls to
'@dircategory' and '@direntry', to ensure a 'dir' file will be created
also by 'install-info' coming with Texinfo 4.8.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: avoid tons of spurious failures on NetBSD
Stefano Lattarini [Sun, 5 Aug 2012 10:14:19 +0000 (12:14 +0200)] 
tests: avoid tons of spurious failures on NetBSD

* t/ax/am-test-lib.sh (process_requirements): Set the '$am_tool' variable
to the empty string before trying to unset it; otherwise, we might be
attempting to unset an already-unset variable, which (together with the
presence of the 'errexit' shell flag) causes spurious failures at least
with the /bin/sh shell from NetBSD 5.1.  This was actually causing the
great majority of the Automake tests (all those not using a "required=..."
declaration) to fail spuriously on that platform!

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoruntest: avoid spurious failures on NetBSD
Stefano Lattarini [Sun, 5 Aug 2012 10:05:35 +0000 (12:05 +0200)] 
runtest: avoid spurious failures on NetBSD

* runtest.in: Use ${1+"$@"} rather than simply "$@", because the 'set -u'
setting used in the script causes the latter to trigger a spurious error
with the NetBSD 5.1 /bin/sh ("./runtest: @: parameter not set") if there
are no arguments to the test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agonews: dependency tracking for Portland Group Compilers is now supported
Stefano Lattarini [Sun, 5 Aug 2012 09:50:30 +0000 (11:50 +0200)] 
news: dependency tracking for Portland Group Compilers is now supported

* NEWS: So document it here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'elisp-work'
Stefano Lattarini [Sun, 5 Aug 2012 09:06:16 +0000 (11:06 +0200)] 
Merge branch 'elisp-work'

* elisp-work:
  news: document all the recent elisp-related changes and improvements
  coverage: byte-compiling elisp files in different subdirectories
  elisp: honour AM_ELCFLAFS and ELCFLAGS in byte-compilation
  elisp: --batch implies -q, remove -q
  elisp: support elisp files in subdirectories properly
  elisp: simplify suffix rules using emacs '-L' option
  elisp: no need to "absolutize" $(srcdir) and $(builddir) ...
  elisp: prefer $(builddir) files over $(srcdir) ones
  elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)
  coverage: elisp path contains $(srcdir) and $(builddir)
  coverage: emacs lisp files in subdirectories

13 years agoMerge branch 'maint'
Stefano Lattarini [Sun, 5 Aug 2012 09:03:40 +0000 (11:03 +0200)] 
Merge branch 'maint'

* maint:
  tests: cater to OpenSolaris 'zip'

13 years agotests: cater to OpenSolaris 'zip'
Stefano Lattarini [Sun, 5 Aug 2012 08:32:15 +0000 (10:32 +0200)] 
tests: cater to OpenSolaris 'zip'

* t/dist-formats.tap: Here: OpenSolaris zip do not accept the
'--version' option, but accept the '-v' one with a similar
meaning (if no further arguments are given).

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