platform/upstream/automake.git
12 years agoam: stop using "%KEY:iffalse?iftrue%" transforms
Stefano Lattarini [Thu, 14 Jun 2012 21:41:58 +0000 (23:41 +0200)]
am: stop using "%KEY:iffalse?iftrue%" transforms

And the similar "reduced forms" "%KEY:iffalse%" and "%KEY?iftrue%"
as well.

They are harder to grasp, can be easily reformulated in function of
other "plainer" transforms ("?KEY?" and "?!KEY?"), and we'll remove
support for them anyway in a later change.

* lib/am/data.am, lib/am/libs.am, lib/am/lisp.am, lib/am/ltlib.am,
lib/am/progs.am, lib/am/python.am, lib/am/scripts.am: Adjusted not
to rely on those kinds of transforms.

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

* maint:
  maintcheck: fix failures, both real and spurious
  subdir tests: avoid an use of "make -j4", for portability
  tests: avoid failure due to libtool quirks in C++ demo test
  tests: fix spurious failures due to missing '$sleep'
  subdirs: unify rules for "cleaning" and "normal" recursive targets
  tests: add a "demo" test on C support
  tests: look for '.lo' rather than '.o' object when using Libtool with C++
  cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
  maint: grammar fixes: s/all these/all of these/
  subdir-objects: improve "make mostlyclean" efficiency and flexibility

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

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

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

* syntax-checks.mk (sc_rm_minus_f): Whitelist the
't/subobj-clean*-pr10697.sh' tests.
* t/subobj-clean-pr10697.sh: When redefining PATH,
use '$PATH_SEPARATOR', not hard-coded ':'.
* t/subobj-clean-lt-pr10697.sh: Likewise.

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

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

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

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

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

Otherwise, a spurious failure with Solaris CCS make can be triggered.
The coverage is not actually reduced, since the code path is still
covered when one runs the testsuite with AM_TESTSUITE_MAKE="make -jN"
(as should be done periodically).

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

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

Revealed by failures on NetBSD 5.1.

* t/cxx-lt-demo.sh: In "make distcheck" invocation, don't define 'CC'
to "false", as that value would be exported and passed to the child
./configure invocation, and some configure checks generated by libtool
autoconf macros can still require a C preprocessor even for packages
using only C++, and bail out if it's not found.  The problem was not
apparent on Solaris and GNU/Linux because those systems have a
'/lib/cpp' program, and configure detected and used that as a fallback
C preprocessor.

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

Revealed by failures on NetBSD 5.1.

* t/subobj-clean-pr10697.sh: Call '$sleep' before modifying the
files that should trigger an automatic remake.
* t/subobj-clean-lt-pr10697.sh: Likewise.

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

* subdirs-simplify:
  subdirs: unify rules for "cleaning" and "normal" recursive targets
  tests: add a "demo" test on C support

* subdir-objects-pr10697:
  subdir-objects: improve "make mostlyclean" efficiency and flexibility
  tests: look for '.lo' rather than '.o' object when using Libtool with C++
  cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"

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

Before this change, the recursive invocation of cleaning targets in
the $(SUBDIRS) where done in inverse order, i.e., starting from the
last $(SUBDIRS) entry and proceeding towards the first.  According
to the code comments, this was done ...

    ... in an attempt to alleviate a problem that can happen when
    dependencies are enabled.  In this case, the .P file in one
    directory can depend on some automatically generated header
    in an earlier directory.  Since the dependencies are required
    before any target is examined, make bombs.

But this comment does not apply anymore to the current implementation
of automatic dependency tracking: the '.Po' and '.Plo' files does not
depend on any C header or source file, ever!

So it seems that the distinction between "normal" and "cleaning"
recursive targets is a stale leftover of an older implementation of
the automatic dependency tracking.  In fact, the Automake History
manual seems to confirm this suspect; the section "First Take on
Dependency Tracking" reads:

    Because each .P file was a dependency of Makefile, this meant
    that dependency tracking was done eagerly by make.  For instance,
    "make clean" would cause all the dependency files to be updated,
    and then immediately removed.  This eagerness also caused problems
    with some configurations; if a certain source file could not be
    compiled on a given architecture for some reason, dependency
    tracking would fail, aborting the entire build.

and the following section "Dependencies As Side Effects" reads:

    In this approach, the .P files were included using the -include
    command, which let us create these files lazily.  This avoided
    the "make clean" problem.

So the distinction between "normal" and "cleaning" recursive targets
has likely been obsolete since by then already.  We can thus remove
such distinction, thus reducing some complications and duplication in
our rules.  Doing so, the whole testsuite still passes (both with GCC
and Sun C 5.9), even the test 'c-demo.sh', which, among the other
things, exercise the setup described in the obsolete code comment
referenced above.

Finally, note that we still keep '$(RECURSIVE_CLEAN_TARGETS)' and
'$(RECURSIVE_TARGETS)' as two distinct variables, to ensure a better
backward-compatibility for any user-defined rules that happen to use
those variables.

* NEWS: Update.
* lib/am/subdirs.am ($(RECURSIVE_CLEAN_TARGETS), $(CLEAN_TARGETS)):
Merge their recipes.
* t/subdir-distclean.sh: New test, check that "./configure && make
&& make distclean" is actually a no-op, even when conditional SUBDIRS
are involved.
* t/list-of-tests.mk: Add it.

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

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

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

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

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

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

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

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

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

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

12 years agosubdir-objects: improve "make mostlyclean" efficiency and flexibility
Stefano Lattarini [Sun, 10 Jun 2012 11:38:58 +0000 (13:38 +0200)]
subdir-objects: improve "make mostlyclean" efficiency and flexibility

Fixes automake bug#10697.

Before this change, the generated Makefile issued one 'rm' invocation
for each subdir object file.  Not only was this very inefficient when
there were several such files, but it also caused stale object files
to be left behind when a source file was renamed or removed.

* automake.in (handle_single_transform): When a subdir object is seen,
update '%compile_clean_files' to clean all the compiled objects in its
same subdirectory, and all the libtool compiled objects ('.lo') there
as well is that subdir object is a libtool one.
* t/subobj-clean-pr10697.sh: New test.
* t/subobj-clean-lt-pr10697.sh: Likewise.
* t/list-of-tests.mk: Add them.
* NEWS: Update.

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

* maint:
  tests: look for '.lo' rather than '.o' object when using Libtool with C++
  cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
  tests: add basic semantic tests on C++ support
  tests: minor tweak to 't/objc-megademo.sh'

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

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

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

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

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

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

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

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

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

* t/objc-megademo.sh (am_create_testdir): Define to "empty" before
including ./defs, because this test doesn't rely on the files usually
pre-set by the setup in there.

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

* automake.in (saw_extension): Now that we use the '%extension_seen'
hash only as a set (it's keys being its elements), we can simplify
the implementation of this function accordingly.

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

* automake.in (saw_sources_p): Remove, its implementation is now so
trivial that it's easier to inline it into ...
(handle_languages): ... it's only caller.

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

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

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

This is just a minor cleanup.  No semantic change is intended.

* automake.in (saw_sources_p): Since its now-only caller calls it with
the '0' argument, remove the code paths that assumed the argument could
be '1', and assume no arguments.
(handle_languages): Drop the arguments '0' in the '&saw_sources_p'
invocation.

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

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

* automake.in (handle_tags): To decide whether to include the tags rules,
rely on whether the automake-defined variable $(SOURCES) is non-empty,
rather than on the fact that '&saw_sources(1)' returns true.

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

This change reduce code duplication a little, and will be needed by
future simplifications.

* automake.in (handle_tags): Define a new 'am__tagged_files' private
make variable that lists all files to run taggers (mkid, cscope, ctags,
etc) on.  Drop the now-useless transform '%CONFIG%' when including
'tags.am'.
* lib/am/tags.am: Use it in several recipes and dependencies list to
reduce code duplication.

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

* lib/am/tags.am (cscopelist): Also scan the files (if any) listed in
the '$(TAGS_FILES) variable, for consistency by what is done by the
'ID', 'TAGS' and 'CTAGS' rules.

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

* lib/am/tags.am (cscopelist, ID): Also scan the file given by the
'%CONFIG%' transform, for consistency by what is done by the 'TAGS'
and 'CTAGS' rules.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'maint'
Stefano Lattarini [Sat, 2 Jun 2012 07:54:17 +0000 (09:54 +0200)]
Merge branch 'maint'

* maint:
  news: document deprecation of configure.in
  news: put planned backward compatibilities early
  sync: update files from upstream with "make fetch"
  maint: deprecate 'configure.in' as autoconf input
  maint: post-release minor version bump
  release: stable release 1.12.1
  copyright: update copyright years in a couple of files
  tests: avoid spurious failures with Solaris 9 cscope program
  maintcheck: fix a spurious failure
  perf: beginning of a performance testsuite
  aclocal: declare function prototypes, do not use '&' in function calls
  news: support for configure.in will be dropped in future automake versions
  tests: fix botched heading comments in 'lex-clean-cxx.sh'
  [ng] maintcheck: some tweaks and fixlets
  help: fix a typo in the list of warning categories
  maint: version bump after beta release
  release: beta release 1.12.0b (will become 1.12.1)
  release: remove overly picky check

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agonews: document deprecation of configure.in
Stefano Lattarini [Sat, 2 Jun 2012 07:34:29 +0000 (09:34 +0200)]
news: document deprecation of configure.in

* NEWS (Warnings and deprecations): We now warn if 'configure.in' is
used instead of 'configure.ac' as autoconf input.
(Future backward-incompatibilities): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agonews: put planned backward compatibilities early
Stefano Lattarini [Sat, 2 Jun 2012 07:24:29 +0000 (09:24 +0200)]
news: put planned backward compatibilities early

* NEWS (Future backward-incompatibilities): Put them in the news
entries for the future 1.12.2 release.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agosync: update files from upstream with "make fetch"
Stefano Lattarini [Fri, 1 Jun 2012 18:24:20 +0000 (20:24 +0200)]
sync: update files from upstream with "make fetch"

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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaint: deprecate 'configure.in' as autoconf input
Stefano Lattarini [Fri, 1 Jun 2012 17:15:29 +0000 (19:15 +0200)]
maint: deprecate 'configure.in' as autoconf input

It has been years since that has been deprecated in the documentation,
in favour of 'configure.ac':

    Previous versions of Autoconf promoted the name configure.in, which
    is somewhat ambiguous (the tool needed to process this file is not
    described by its extension), and introduces a slight confusion with
    config.h.in and so on (for which '.in' means "to be processed by
    configure"). Using configure.ac is now preferred.

It's now time to start giving runtime warning about the use of
'configure.in', so that support for it can be removed in future
versions of autoconf/automake.

See also, in the Autoconf repository, commit 'v2.69-4-g560f16b' of
2012-05-23, "general: deprecate 'configure.in' as autoconf input".

* lib/Automake/Configure_ac.pm: Issue a warning in the 'obsolete'
category if 'configure.in' is detected.  Since this module is synced
from Automake, this change is to be backported there (and will be
soon).
* t/help.sh: Adjust.
* t/configure.sh: Adjust and enhance.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaint: post-release minor version bump
Stefano Lattarini [Fri, 1 Jun 2012 16:55:14 +0000 (18:55 +0200)]
maint: post-release minor version bump

* configure.ac (AC_INIT): Bump version number to 1.12.1a.
* m4/amversion.m4: Likewise (automatically regenerated by
"make bootstrap").

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agorelease: stable release 1.12.1 v1.12.1
Stefano Lattarini [Fri, 1 Jun 2012 13:50:03 +0000 (15:50 +0200)]
release: stable release 1.12.1

* configure.ac (AC_INIT): Bump version number to 1.12.1.
* m4/amversion.m4: Likewise (auto-updated by "./bootstrap").

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agocopyright: update copyright years in a couple of files
Stefano Lattarini [Fri, 1 Jun 2012 13:47:17 +0000 (15:47 +0200)]
copyright: update copyright years in a couple of files

* doc/help2man, t/aclocal-verbose-install.sh: Update copyright,
thanks to "make update-copyright".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agotests: avoid spurious failures with Solaris 9 cscope program
Stefano Lattarini [Fri, 1 Jun 2012 10:37:41 +0000 (12:37 +0200)]
tests: avoid spurious failures with Solaris 9 cscope program

* t/cscope.tap: Also check that the cscope program in use supports the
'-q' option; if this is not the case, some cscope usages in the generated
Makefiles would fail, so we must skip the checks involving those usages.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaintcheck: fix a spurious failure
Stefano Lattarini [Fri, 1 Jun 2012 09:49:16 +0000 (11:49 +0200)]
maintcheck: fix a spurious failure

* Makefile.am (test_subdirs): Add 't/perf'.  Fix spurious failure
of the 'maintainer-check-list-of-tests' target.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoperf: beginning of a performance testsuite
Stefano Lattarini [Tue, 29 May 2012 09:58:02 +0000 (11:58 +0200)]
perf: beginning of a performance testsuite

Some tests in the Automake testsuite already aims only at verifying
the performance, rather than the correctness, of some operations.
Still, they are somewhat shoehorned and forced into the PASS/FAIL
framework (say, with the 'ulimit' shell builtin used to verify some
operation doesn't take up too much time or memory), but that is
conceptually a stretch, and has already caused problems in practice
(see automake bug#11512 for an example).

So we start moving the "performance tests" out of the testsuite proper,
and make them run only "on demand" (when the user exports the variable
'AM_TESTSUITE_PERF' to "yes").  Ideally, we should provide those tests
with a custom runner/driver that measures and displays the relevant
performance information, but doing that correctly and with the right
APIs is definitely more difficult, so we leave it for a later step
(an hope we'll take such a step eventually).

* t/cond29.sh: Move ...
* t/perf/cond.sh: ... here, and adjust.
* t/testsuite-recheck-speed.sh: Move ...
* t/perf/testsuite-recheck.sh: ... here.
* t/testsuite-summary-speed.sh: Move ...
* t/perf/testsuite-summary.sh: ... here.
* t/list-of-tests.mk (perf_TESTS): New variable, listing the tests in
the 't/perf' directory.
(handwritten_TESTS): Adjust.
* defs: Skip any tests in the 't/perf/' subdirectory unless the
'AM_TESTSUITE_PERF' variable is set to "yes" or "y".
* .gitignore: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'fix-pr11543' into maint
Stefano Lattarini [Tue, 29 May 2012 07:36:26 +0000 (09:36 +0200)]
Merge branch 'fix-pr11543' into maint

* fix-pr11543:
  aclocal: declare function prototypes, do not use '&' in function calls

12 years agoaclocal: declare function prototypes, do not use '&' in function calls
Stefano Lattarini [Mon, 28 May 2012 11:32:03 +0000 (13:32 +0200)]
aclocal: declare function prototypes, do not use '&' in function calls

This change will also fix automake bug#11543 (from a report by Matt
Burgess).

* aclocal.in: Declare prototypes for almost all functions early, before
any actual function definition (but omit the prototype for the dynamically
generated '&search' function).  Add prototypes to any function definition.
Remove '&' from function invocations (i.e., simply use "func(ARGS..)"
instead of "&func(ARGS...)").
* THANKS, NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agonews: support for configure.in will be dropped in future automake versions
Stefano Lattarini [Mon, 28 May 2012 11:52:34 +0000 (13:52 +0200)]
news: support for configure.in will be dropped in future automake versions

The use of configure.in as Autoconf input has been deprecated for a
very long time in the Autoconf documentation, and the next version of
Autoconf (2.70) will start warning about it ar runtime as well (see
commit 'v2.69-4-g560f16b' or 2012-05-23, "general: deprecate
'configure.in' as autoconf input", in the Autoconf's git repository).

* NEWS (Future backward-incompatibilities): Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomissing: support AC_CONFIG_HEADERS in addition to obsolete AC_CONFIG_HEADER
Stefano Lattarini [Sun, 27 May 2012 17:33:26 +0000 (19:33 +0200)]
missing: support AC_CONFIG_HEADERS in addition to obsolete AC_CONFIG_HEADER

* missing (autoheader*): Do not look only for AC_CONFIG_HEADER when
grepping configure.ac, but also for AC_CONFIG_HEADERS: the latter has
been preferred to the former by several years now in Autoconf.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomissing: don't bother checking for AM_CONFIG_HEADER: it is gone now
Stefano Lattarini [Sun, 27 May 2012 17:05:14 +0000 (19:05 +0200)]
missing: don't bother checking for AM_CONFIG_HEADER: it is gone now

* missing (autoheader*): Do not look for AM_CONFIG_HEADER when
grepping configure.ac: it is not supported anymore (has been in
fact deleted in commit v1.12-15-gd2ca168 of 2012-04-27, "m4: delete
several obsolete macros").

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agodocs: remove mention of AM_CONFIG_HEADER: it is obsolete and removed now
Stefano Lattarini [Sun, 27 May 2012 16:47:46 +0000 (18:47 +0200)]
docs: remove mention of AM_CONFIG_HEADER: it is obsolete and removed now

* doc/automake.texi (Variables used when building a program): Remove
obsolete mention of AM_CONFIG_HEADER as an alias to AC_CONFIG_HEADERS.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agotests: fix botched heading comments in 'lex-clean-cxx.sh'
Stefano Lattarini [Sat, 26 May 2012 16:01:23 +0000 (18:01 +0200)]
tests: fix botched heading comments in 'lex-clean-cxx.sh'

* t/lex-clean-cxx.sh: This file tests lex, not yacc.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago[ng] maintcheck: some tweaks and fixlets
Stefano Lattarini [Fri, 25 May 2012 16:49:07 +0000 (18:49 +0200)]
[ng] maintcheck: some tweaks and fixlets

* syntax-checks.mk (sc_no_brace_variable_expansions): Do not complain
about ${MAKEVAR} usages in comments: they might be legitimate.  This
change is not strictly required for mainline automake, but will help
in the Automake-NG branch.
* sc_tests_here_document_format: Relax a bit, so that usages like
"cout << "string" << endl;" in the test scripts (usages which can be
used in here documents defining C++ sources) are not flagged as uses
of bad delimiters for here documents.  This change is not strictly
required for mainline automake, but will help in the Automake-NG
branch, and will anyway be more future proof w.r.t. possible future
testsuite additions.
(sc_tests_Exit_not_exit): Do not whitelist lines containing $PERL
explicitly (that was only required for one test); instead ...
* t/ext2.sh: ... use "exit (1)" instead of "exit 1" in the perl
invocation of the guilty script.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'am-init-automake'
Stefano Lattarini [Fri, 25 May 2012 12:50:05 +0000 (14:50 +0200)]
Merge branch 'am-init-automake'

* am-init-automake:
  init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoinit: obsolete usages of AM_INIT_AUTOMAKE not supported anymore
Stefano Lattarini [Sat, 19 May 2012 09:47:26 +0000 (11:47 +0200)]
init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore

This is a follow-up on commit v1.12-66-g27136df of 2012-05-06, "init: warn
against obsolete usage of AM_INIT_AUTOMAKE".

With this change, we drop support for the two-arguments and three-arguments
invocation forms of the AM_INIT_AUTOMAKE macro, as in either of:
    AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    AM_INIT_AUTOMAKE($PACKAGE, $VERSION, NODEFINE)

* NEWS, doc/automake.texi: Update.
* m4/init.m4 (AM_INIT_AUTOMAKE): Report the two- and three-arguments
invocation form as a hard error.
* t/aminit-moreargs-deprecation.sh: Renamed ...
* t/aminit-moreargs-deprecation.sh: ... to this, and updated to check
the new semantics.
* t/ac-output-old.tap: Adjust by avoiding old-style uses of AC_INIT
and AM_INIT_AUTOMAKE.
* t/acsilent.sh: Likewise.
* t/dirlist.sh: Likewise.
* t/dirlist2.sh: Likewise.
* t/req.sh: Likewise.
* t/nodef.sh: Remove as obsolete.
* t/version.sh: Likewise.
* t/version2.sh: Likewise.
* t/backcompat.sh: Likewise.
* t/backcompat2.sh: Likewise.
* t/backcompat3.sh: Likewise.
* t/backcompat5.sh: Likewise.
* t/backcompat4.sh: Renamed ...
* t/backcompat-acout.sh: ... to this.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agohelp: fix a typo in the list of warning categories
Stefano Lattarini [Mon, 21 May 2012 13:44:14 +0000 (15:44 +0200)]
help: fix a typo in the list of warning categories

* lib/Automake/ChannelDefs.pm (usage): s/none'/none/.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaint: version bump after beta release
Stefano Lattarini [Sat, 19 May 2012 13:27:21 +0000 (15:27 +0200)]
maint: version bump after beta release

* configure.ac (AC_INIT): Bump version number to 1.12.0c.
* m4/amversion.m4: Likewise (auto-updated by "./bootstrap").

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agorelease: beta release 1.12.0b (will become 1.12.1) v1.12.0b
Stefano Lattarini [Sat, 19 May 2012 13:18:43 +0000 (15:18 +0200)]
release: beta release 1.12.0b (will become 1.12.1)

* configure.ac (AC_INIT): Bump version number to 1.12.0b.
* m4/amversion.m4: Likewise (auto-updated by "./bootstrap").

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agorelease: remove overly picky check
Stefano Lattarini [Sat, 19 May 2012 13:11:36 +0000 (15:11 +0200)]
release: remove overly picky check

* Makefile.am (git-tag-release): Do not check that the version number
NEWS is updated w.r.t. $(VERSION); given the new way we manage NEWS,
that would cause gratuitous spurious failures.
* HACKING: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'parallel-tests-default'
Stefano Lattarini [Sat, 19 May 2012 12:13:39 +0000 (14:13 +0200)]
Merge branch 'parallel-tests-default'

* parallel-tests-default:
  check: the parallel-tests driver is now the default

12 years agoMerge branch 'maint'
Stefano Lattarini [Sat, 19 May 2012 12:09:55 +0000 (14:09 +0200)]
Merge branch 'maint'

* maint:
  ylwrap: preserve subdirectories in "#line" munging
  ylwrap: preparatory refactoring

12 years agoMerge branch 'ylwrap-line-filename' into maint
Stefano Lattarini [Sat, 19 May 2012 11:22:12 +0000 (13:22 +0200)]
Merge branch 'ylwrap-line-filename' into maint

* ylwrap-line-filename:
  ylwrap: preserve subdirectories in "#line" munging
  ylwrap: preparatory refactoring

12 years agocheck: the parallel-tests driver is now the default
Stefano Lattarini [Fri, 18 May 2012 16:00:51 +0000 (18:00 +0200)]
check: the parallel-tests driver is now the default

The old serial testsuite driver is still supported, and can be activated
by the 'serial-tests' option (introduced by commit 'v1.11-1989-gdeb7773'
of 2012-02-20, "automake: new option 'serial-tests'").

* lib/Automake/Options.pm: Now, the 'parallel-tests' option is a no-op
(but still explicitly recognized, for backward compatibility), while the
'serial-tests' option is recognized and registered.
* automake.in: Adjust to ensure that the parallel test harness is used by
default; mostly, this amounts at using "! option('serial-tests')" where
"option('parallel-tests')" was used before.
* NEWS, doc/automake.texi: Update.
* configure.ac (AM_INIT_AUTOMAKE): Drop 'parallel-tests' option, is
redundant now.
* defs: In the generated AM_INIT_AUTOMAKE call, use the 'serial-tests'
when the serial testsuite harness is to be used, and no option otherwise.
* lib/am/check.am: Use (static) conditional '%SERIAL_TESTS%' instead of
conditional '%PARALLEL_TESTS%'.
* lib/test-driver: Adjust heading comments.
* t/ax/extract-testsuite-summary.pl: Likewise.
* t/check-exported-srcdir.sh: Likewise.
* t/check-subst.sh: Likewise.
* t/java-compile-run-nested.sh: Likewise.
* t/parallel-tests-dry-run-1.sh: Likewise.
* t/parallel-tests-dry-run-2.sh: Likewise.
* t/parallel-tests-interrupt.sh: Likewise.
* t/parallel-tests-many.sh: Likewise.
* t/test-metadata-global-log.sh: Likewise.
* t/tests-environment-backcompat.sh: Likewise.
* m4/init.m4 (AM_INIT_AUTOMAKE): Adjust a comment.
* t/check8.sh: Likewise.
* t/check-tests-in-builddir.sh: Likewise.
* t/java-compile-run-flat.sh: Adjust a botched comment.
* t/ax/tap-summary-aux.sh: Remove explicit use of the 'parallel-tests'
option.
* t/ax/testsuite-summary-checks.sh: Likewise.
* t/aclocal-path-precedence.sh: Likewise.
* t/dist-aux-many-subdirs.sh: Likewise.
* t/parallel-tests-no-color-in-log.sh: Likewise.
* t/parallel-tests-reset-term.sh: Likewise.
* t/parallel-tests-subdir.sh: Likewise.
* t/check-no-test-driver.sh: Fix setup to adjust to the changed
semantics.  Update heading comments.
* t/parallel-tests-driver-install.sh: Adjust to the new semantic.
* t/test-driver-is-distributed.sh: Simplified according to the
new semantics.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 18 May 2012 12:31:36 +0000 (14:31 +0200)]
Merge branch 'maint'

* maint:
  tests: use 'parallel-tests' Automake option by default
  doc: fix location of Automake's own test-suite.log file
  yacc tests: avoid a spurious failure with Sun C++ 5.9
  self tests: cater for /bin/ksh symlinked to Zsh
  tests: fix spurious failures due to dpkg install-info

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agotests: use 'parallel-tests' Automake option by default
Stefano Lattarini [Tue, 15 May 2012 14:12:09 +0000 (16:12 +0200)]
tests: use 'parallel-tests' Automake option by default

This will help our transition from 'serial-tests' to 'parallel-tests'
as the default test suite driver enabled by a TESTS assignment in the
input Makefile.am.  Note that that change of default will only take
place in master, though.

* defs: Pass the 'parallel-tests' option to the AM_INIT_AUTOMAKE
invocation in the created 'configure.ac' stub, unless the variable
'am_serial_tests' is set to "yes".  Don't pay attention anymore to
the 'am_parallel_tests' variable, that's obsolete now.
* defs-static.in: Warn if the 'am_serial_tests' variable is set in the
environment; conversely, don't warn anymore about 'am_parallel_tests'
being set in the environment.
* Makefile.am (AM_TESTS_ENVIRONMENT): Nullify the 'am_serial_tests'
variable instead of the now-obsolete 'am_parallel_tests' one.
* syntax-checks.mk (sc_tests_obsolete_variables): Also warn against
uses of 'am_parallel_tests', which is now deprecated in favor of
'am_serial_tests'.  Similarly, if a use of 'parallel_tests' is seen,
suggest using 'am_serial_tests' instead, not 'am_parallel_tests'.
* gen-testsuite-part: Now that we use the 'parallel-tests' by default
in our tests, we need to completely change the logic and semantics of
generation of sibling tests for those tests that check the Automake
generated testsuite harness itself.  Do that, and give a complete
explanation of the new logic and semantics in the relevant comments.
* t/README: Update.
* Lots of test cases: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agodoc: fix location of Automake's own test-suite.log file
Stefano Lattarini [Thu, 17 May 2012 10:36:23 +0000 (12:36 +0200)]
doc: fix location of Automake's own test-suite.log file

* doc/automake.texi (Reporting Bugs): The global testsuite log of
Automake is now (basically since we have removed make recursion from
the Automake's build system) saved in the file 'test-suite.log', not
in the file 'tests/test-suite.log'.  Adjust accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoylwrap: preserve subdirectories in "#line" munging
Nikolai Weibull [Wed, 16 May 2012 16:16:41 +0000 (18:16 +0200)]
ylwrap: preserve subdirectories in "#line" munging

If Automake is used in non-recursive mode and one of the inputs is a
yacc file, for example, "src/grammar.y", ylwrap will remove too many
directories from the output file when it adjusts the paths in it.
This results in #line directives referring to "grammar.y" instead of
"src/grammar.y".

This is a result of $input_rx simply taking all the directory
components of the absolute input path and removing them.

One solution is to store the path passed to ylwrap and replace
$input_rx with it.  This is what we do.

Suggestion and initial patch (without tests) by Nikolai Weibull:
<http://lists.gnu.org/archive/html/automake/2012-05/msg00013.html>
Final patch by Stefano Lattarini.

* lib/ylwrap ($input_sub_rx): New.
When munging the #line directives, substitute '$input_rx' with it,
instead of stripping it altogether.
Adjust comments.
* t/yacc-line.sh, t/lex-line: Adjust and extend.
* NEWS, THANKS: Update.

Copyright-paperwork-exempt: yes
Co-authored-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoylwrap: preparatory refactoring
Stefano Lattarini [Wed, 16 May 2012 15:35:05 +0000 (17:35 +0200)]
ylwrap: preparatory refactoring

This commit should cause no semantic change in the ylwrap behaviour.
It will only be needed in light of a future change.  See:
<http://lists.gnu.org/archive/html/automake/2012-05/msg00013.html>

* lib/ylwrap (get_dirname, quote_for_sed): New functions, factoring
out some non-trivial code.  Use them where appropriate.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoyacc tests: avoid a spurious failure with Sun C++ 5.9
Stefano Lattarini [Wed, 16 May 2012 14:26:39 +0000 (16:26 +0200)]
yacc tests: avoid a spurious failure with Sun C++ 5.9

* t/yacc-cxx.sh (parse1.yy): When calling the 'getchar' function declared
in the #included <cstdio>, fully qualify it as std::getchar', to avoid
Sun C++ 5.9 erroring out with:
"parse1.yy", line 5: Error: The function "getc" must have a prototype.
* t/yacc-clean-cxx.sh (sub1/parsefoo.yxx): Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoself tests: cater for /bin/ksh symlinked to Zsh
Stefano Lattarini [Wed, 16 May 2012 14:10:06 +0000 (16:10 +0200)]
self tests: cater for /bin/ksh symlinked to Zsh

* t/self-check-reexec.tap: When searching for a suitable non-Bash
shells, be sure to reject any shell that is Zsh "in disguise" (as
can be found on some Debian systems, where /bin/ksh can be symlinked
to /bin/zsh4).  This is required because our testsuite does not
support older versions of Zsh, and that was causing the test to fail
in the setup just described.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agotests: fix spurious failures due to dpkg install-info
Stefano Lattarini [Wed, 16 May 2012 13:50:14 +0000 (15:50 +0200)]
tests: fix spurious failures due to dpkg install-info

* t/install-info-dir.sh: Skip some checks if 'install-info' is the one
from dpkg, not the one from GNU info; the former might try to create
files in '/var/backups/', causing spurious failures like this for any
non-root user:

    install-info(.../install-info-dir.dir/_inst/info/foo.info): \
      creating new section `Dummy utilities'
    cp: cannot create regular file `/var/backups/infodir.bak': \
      Permission denied
    install-info(.../install-info-dir.dir/_inst/info/foo.info): \
      could not backup .../install-info-dir.dir/_inst/info/dir in \
      /var/backups/infodir.bak: No such file or directory

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'maint'
Stefano Lattarini [Sun, 13 May 2012 12:10:25 +0000 (14:10 +0200)]
Merge branch 'maint'

* maint:
  tests: fix spurious failure due to i18n issue
  tests: add few missing 'cc' and 'c++' requirements

12 years agotests: fix spurious failure due to i18n issue
Stefano Lattarini [Sat, 12 May 2012 06:42:37 +0000 (08:42 +0200)]
tests: fix spurious failure due to i18n issue

Fixes automake bug#11452.

* t/parallel-tests-fork-bomb.sh: Export LANG, LANGUAGE and LC_ALL to
'C', to ensure error messages will be in English, and thus avoiding
possible false negatives in our grepping of them.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agotests: add few missing 'cc' and 'c++' requirements
Stefano Lattarini [Thu, 10 May 2012 12:32:27 +0000 (14:32 +0200)]
tests: add few missing 'cc' and 'c++' requirements

Without that requirements, the configure-time overrides of CC and CXX
wouldn't be honored in the affected tests.

* t/silent-yacc.sh ($required): Require 'cc'.
* t/silent-yacc-headers.sh: Likewise.
* t/silent-lex.sh: Likewise.
* t/lex-clean.sh: Likewise.
* t/lex-depend.sh: Likewise.
* t/lex-line.sh: Likewise.
* t/lex-depend.sh: Likewise.
* t/lex-pr204.sh: Likewise.
* t/yacc-deleted-headers.sh: Likewise.
* t/yacc-line.sh: Likewise.
* t/yacc-depend.sh: Likewise.
* t/yacc-depend2.sh: Likewise.
* t/yacc-dist-nobuild-subdir.sh: Likewise.
* t/yacc-bison-skeleton.sh: Likewise.
* t/yacc-bison-skeleton-cxx.sh ($required): Require 'c++'.
* t/yacc-clean-cxx.sh: Likewise.
* t/yacc-d-cxx.sh: Likewise.
* t/yacc-cxx.sh: Likewise.
* t/yacc-mix-c-cxx.sh ($required): Require 'cc' and 'c++'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agofixup: s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/ in 't/confsub.sh'
Stefano Lattarini [Tue, 8 May 2012 11:22:59 +0000 (13:22 +0200)]
fixup: s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/ in 't/confsub.sh'

Issue introduced in the recent merge 'v1.12-101-g12405c9'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'maint'
Stefano Lattarini [Tue, 8 May 2012 10:49:36 +0000 (12:49 +0200)]
Merge branch 'maint'

* maint:
  tests: fix a spurious failure with dash
  test defs: fix indentation (cosmetic change)
  tests: remove obsolete uses of $sh_errexit_works
  configure: search a sturdy POSIX shell to be used in the testsuite
  tests: shell running test scripts is now named AM_TEST_RUNNER_SHELL
  fixup: distribute t/README
  init: warn against obsolete usage of AM_INIT_AUTOMAKE

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'testsuite-saner-shell' into maint
Stefano Lattarini [Mon, 7 May 2012 20:11:28 +0000 (22:11 +0200)]
Merge branch 'testsuite-saner-shell' into maint

* testsuite-saner-shell:
  tests: fix a spurious failure with dash
  test defs: fix indentation (cosmetic change)
  tests: remove obsolete uses of $sh_errexit_works
  configure: search a sturdy POSIX shell to be used in the testsuite
  tests: shell running test scripts is now named AM_TEST_RUNNER_SHELL

12 years agotests: fix a spurious failure with dash
Stefano Lattarini [Mon, 23 Apr 2012 17:03:33 +0000 (19:03 +0200)]
tests: fix a spurious failure with dash

The dash shell, at least version 0.5.5.1, doesn't always bail out
with a syntax error when a stray "fi" in encountered:

  $ dash -c ":; fi"; echo stat = $?
  stat = 0

See also the relevant bug report:

  <http://permalink.gmane.org/gmane.comp.shells.dash/717>

This behaviour was causing a spurious error in our testsuite.  Fix it.

* t/self-check-exit.tap: Use a stray parentheses rather than a stray
'fi' to trigger a syntax error.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agotest defs: fix indentation (cosmetic change)
Stefano Lattarini [Wed, 28 Dec 2011 12:23:31 +0000 (13:23 +0100)]
test defs: fix indentation (cosmetic change)

* defs (exit trap): Fix indentation left botched by previous
patch 'v1.11b-51-g626bf65'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agotests: remove obsolete uses of $sh_errexit_works
Stefano Lattarini [Wed, 28 Dec 2011 12:23:31 +0000 (13:23 +0100)]
tests: remove obsolete uses of $sh_errexit_works

After the last changes, configure will ensure that the shell
selected to run the test scripts can correctly propagate exit
status to the exit trap when 'set -e' is in effect.

* configure.ac (sh_errexit_works): Do not AC_SUBST it anymore.
* defs-static.in (sh_errexit_works): Do not initialize
from the AC_SUBST value anymore.
* defs (trap): Trap the EXIT signal unconditionally.
* t/self-check-explicit-skips.sh: Do not skip the test if
'$sh_errexit_works' is != "yes", this check doesn't make
sense anymore.
* t/self-check-cleanup.tap: Likewise.
* t/self-check-exit.tap: Assume the exit trap is always
installed by ./defs.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoconfigure: search a sturdy POSIX shell to be used in the testsuite
Stefano Lattarini [Wed, 28 Dec 2011 12:23:31 +0000 (13:23 +0100)]
configure: search a sturdy POSIX shell to be used in the testsuite

* configure.ac: Add code (partially inspired to checks in gnulib's
'tests/init.sh') to search for a good-enough, not-buggy POSIX/XSI
shell to be used in our testsuite.  Accordingly AC_SUBSTitute the
variable 'AM_TEST_RUNNER_SHELL'.
* NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agotests: shell running test scripts is now named AM_TEST_RUNNER_SHELL
Stefano Lattarini [Wed, 28 Dec 2011 12:23:31 +0000 (13:23 +0100)]
tests: shell running test scripts is now named AM_TEST_RUNNER_SHELL

This is just a preparatory refactoring for future changes.

* configure.ac (AM_TEST_RUNNER_SHELL): New variable, defined
to $SHELL', and AC_SUBST'd.
* Makefile.am (LOG_COMPILER): Redefine from $(SHELL) to
$(AM_TEST_RUNNER_SHELL).
* defs: Adjust to use $AM_TEST_RUNNER_SHELL instead
of $CONFIG_SHELL and/or $SHELL, where appropriate.  Minor
opportunistic changes.
* t/self-check-explicit-skips.sh: Likewise.
* t/self-check-sanity.sh: Likewise.
* t/self-check-tap.sh: Likewise.
* t/self-check-cleanup.tap: Likewise.
* t/self-check-dir.tap: Likewise.
* t/self-check-env-sanitize.tap: Likewise.
* t/self-check-exit.tap: Likewise.
* t/self-check-me.tap: Likewise.
* t/self-check-reexec.tap: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agofixup: distribute t/README
Stefano Lattarini [Sun, 6 May 2012 11:33:09 +0000 (13:33 +0200)]
fixup: distribute t/README

Since commit v1.11-2128-g8e02441 of 2012-04-06, "maint: no more make
recursion in Automake's build system" we haven't been distributing the
testsuite README file in our release tarballs.  Oops.

* Makefile.am (EXTRA_DIST): Add 't/README'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoinit: warn against obsolete usage of AM_INIT_AUTOMAKE
Stefano Lattarini [Sat, 31 Mar 2012 14:39:32 +0000 (16:39 +0200)]
init: warn against obsolete usage of AM_INIT_AUTOMAKE

Support for the two- and three-arguments invocation forms of the
AM_INIT_AUTOMAKE macro, as in:

  AM_INIT_AUTOMAKE($PACKAGE, $VERSION)

or:

  AM_INIT_AUTOMAKE($PACKAGE, $VERSION, NODEFINE)

will be removed in the next major Automake release (1.13).

Such usages have already been deprecated in the documentation
starting from commit v1.11-2015-ge99690a of 23-02-2012 "docs,
news: document planned removal of obsolete macros and features".

We now start giving runtime warnings as well (in the 'obsolete'
category).

* NEWS: Update.
* m4/init.m4 (AM_INIT_AUTOMAKE): Report the two- and three-arguments
form invocation.
* automake.in (scan_autoconf_traces): Likewise.
* doc/automake.texi: Minor adjustments.  Add an @anchor to the
location where it's described how to modernize outdated invocation
of AM_INIT_AUTOMAKE, so that it can be referenced from automake
warning/error messages.
* t/aminit-moreargs-deprecation.sh: New test.
* tests/list-of-tests.mk: Add it.
* tests/ac-output-old.tap: Adjust by calling automake with the
warnings in the 'obsolete' category disabled.
* t/backcompat.test: Likewise.
* t/backcompat3.test: Likewise.
* t/backcompat5.test: Likewise.
* t/backcompat6.test: Likewise.
* t/version.test: Likewise.
* t/version2.test: Likewise.
* t/pr2.test: Modernize style of AC_INIT and AM_INIT_AUTOMAKE
invocations, and use proper m4 quoting.
* t/pr87.test: Likewise.
* t/confsub.test: Likewise.
* t/install2.test: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'maint'
Stefano Lattarini [Sun, 6 May 2012 09:04:45 +0000 (11:04 +0200)]
Merge branch 'maint'

* maint:
  m4: prepend m4 builtins with "m4_"
  docs: fix clumsy grammar in the scripts-based testsuite chapter

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agom4: prepend m4 builtins with "m4_"
Stefano Lattarini [Sun, 6 May 2012 08:15:59 +0000 (10:15 +0200)]
m4: prepend m4 builtins with "m4_"

The comments in 'lib/autoconf/autoconf.m4' from Autoconf 2.69 read:

  We discourage the use of the non prefixed macro names: M4sugar maps
  all the builtins into 'm4_'.  Autoconf has been converted to these
  names too.  But users may still depend upon these, so reestablish
  them.

Alas, in our init.m4 files, we were still using m4 builtins without
prefixing them with "m4_".  Not nice for a package that is one of the
major clients of Autoconf, and an integral part of the GNU Autotools!

Fix the issue.

* m4/init.m4 (AM_INIT_AUTOMAKE): Use 'm4_define' and 'm4_defn' instead
of 'define' and 'defn'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agorequire: autoconf >= 2.65; related simplifications
Stefano Lattarini [Sat, 5 May 2012 19:48:49 +0000 (21:48 +0200)]
require: autoconf >= 2.65; related simplifications

The new support for Objective C++ (to be added in Automake 1.12.1) can be
simplified if we assume Autoconf version 2.65 or later (2.65 being the
version that introduced support for Objective C++).  Since such an Autoconf
version is two and half years old now (and will likely be almost three
years old when Automake 1.13 gets released), requiring it is acceptable.
This will also simplify testing and maintenance of Automake, because we'll
need to test with fewer Autoconf version, and possibly rely on new Autoconf
features.

* NEWS (Version requirements): Automake 1.13 will require Autoconf
2.65 or later.
* configure.ac ($required_autoconf_version): Bump to 2.65.
* m4/init.m4 (AM_INIT_AUTOMAKE): Require Autoconf >= 2.65.
Assume AC_PROG_OBJCXX is unconditionally defined.
* m4/depout.m4: Adjust a comment about a nugget of defensive programming.
* t/ext.sh: Assume that AC_PROG_OBJCXX is unconditionally defined,
and that we are using Autoconf >= 2.65.  Related simplifications.
* t/objc-megademo.sh: Likewise.
* t/objcxx-basic.sh: Likewise.
* t/objcxx-deps.sh: Likewise.
* t/objcxx-flags.sh: Likewise.
* t/objcxx-minidemo.sh: Likewise.
* t/nodep2.sh: Likewise.
* t/backcompat3.sh: Assume AC_INIT accepts an URL argument.
* t/depend5.sh: Adjust a comment.
* syntax-checks.mk (sc_test_names): Delete this check as now useless:
autoconf >= 2.65 (>= 2.63, actually) can handle arguments to AC_INIT
that contain or are m4 builtins or predefined macros.
(m4_builtin): Delete this now-useless variable as well, was used only
by the check above.
(syntax_check_rules): Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agodocs: fix clumsy grammar in the scripts-based testsuite chapter
Nick Alcock [Fri, 4 May 2012 14:14:43 +0000 (15:14 +0100)]
docs: fix clumsy grammar in the scripts-based testsuite chapter

* doc/automake.texi (Scripts-based Testsuites): "We'll have later" is
a rare example of English in the Automake manual clearly not written
by a native English-speaker: while comprehensible, it can be better
formulated.

Copyright-paperwork-exempt: yes
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'maint'
Stefano Lattarini [Sat, 5 May 2012 17:28:35 +0000 (19:28 +0200)]
Merge branch 'maint'

* maint:
  tests: use append mode to capture parallel make output
  parallel-tests: separate different logs with an empty line

12 years agotests: use append mode to capture parallel make output
Stefano Lattarini [Sat, 5 May 2012 17:22:40 +0000 (19:22 +0200)]
tests: use append mode to capture parallel make output

This should fix the spurious failure reported in automake bug#11413.

This is due to the fact that the redirected output of parallel make
can racily loose lines.  For example, if GNU make (3.82) is run on
a Makefile like this:

  all = 0 1 2 3 4 5 6 7 8 9
  default: $(all)
  $(all):
        @sleep 0.$$(($RANDOM % 10)); echo $@

and has its standard output redirected in overwrite-mode to a regular
file, it looses a line of that output every 15 runs or so on a Fedora
17 system with 64 ppc64 cores and Linux 3.3.1.  Redirection in append
mode does not suffer of this problem.

See also similar commit 'Release-1-10-280-g6426999' of 2009-03-10,
"Use append mode to capture parallel test output", which tackled a
similar problem for 't/parallel-tests3.sh' and 't/lisp8.sh'.

* t/tap-more.sh: Use append mode for output from "make -j", to avoid
dropped lines.
* t/parallel-tests3.sh, t/lisp8.sh: Enhance comments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'parallel-tests-performance' into maint
Stefano Lattarini [Sat, 5 May 2012 14:39:10 +0000 (16:39 +0200)]
Merge branch 'parallel-tests-performance' into maint

* parallel-tests-performance:
  parallel-tests: separate different logs with an empty line

12 years agoparallel-tests: separate different logs with an empty line
Stefano Lattarini [Sat, 5 May 2012 14:33:36 +0000 (16:33 +0200)]
parallel-tests: separate different logs with an empty line

After commit v1.12-21-g5eeb366 "parallel-tests: optimize global log
creation", the log files copied in the global log are not anymore
separated by a blank line, causing unclear output like this:

  FAIL: test1
  ===========

  output from test 1
  FAIL: test2
  ===========

  output from test 2

where we would want something like this:

  FAIL: test1
  ===========

  output from test 1

  FAIL: test2
  ===========

  output from test 2

Fix this regression.

* lib/am/check.am (am__create_global_log): Print an extra empty line
after having displayed the content of a '.log' file.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'maint'
Stefano Lattarini [Sat, 5 May 2012 08:57:27 +0000 (10:57 +0200)]
Merge branch 'maint'

* maint:
  maintcheck: avoid a couple of spurious failures
  maintcheck: reduce code duplication, increase coverage

12 years agomaintcheck: avoid a couple of spurious failures
Stefano Lattarini [Fri, 4 May 2012 16:09:02 +0000 (18:09 +0200)]
maintcheck: avoid a couple of spurious failures

* t/objcxx-deps.sh, t/objcxx-minidemo.sh: In C++ files, use
"std::cout <<", not "cout <<", to avoid triggering a spurious
failure by the syntax check 'sc_tests_here_document_format'.

Cherry-picked from yesterday's commit v1.12-81-g7f3f467, that
had erroneously been applied to 'master' only rather than to
'maint'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaintcheck: reduce code duplication, increase coverage
Stefano Lattarini [Sat, 5 May 2012 00:01:20 +0000 (02:01 +0200)]
maintcheck: reduce code duplication, increase coverage

* syntax-checks.mk: Move ...
(sc_tests_plain_aclocal,
sc_tests_plain_autoconf,
sc_tests_plain_perl,
sc_tests_plain_autoupdate,
sc_tests_plain_automake,
sc_tests_plain_make,
sc_tests_plain_autoheader,
sc_tests_plain_autoreconf,
sc_tests_plain_autom4te): ... all these targets ...
(sc_tests_plain_egrep_fgrep): ... and part of this target ...
(sc_tests_plain_check_rules): ... into this variable, and
reimplement their recipes ...
($(sc_tests_plain_check_rules)): ... with this static pattern
rule.  Enhance the coverage they offer a little since we are
at it.
(sc_m4_am_plain_egrep_fgrep): New rule, the part of the old
'sc_tests_plain_egrep_fgrep' rule that checked for use of
'fgrep' and 'egrep' in *.am and *.m4 fragments (rather than
in test scripts).
(syntax_check_rules): Update.
* t/dist-formats.tap: Fix bad use of "make" instead of "$MAKE"
revealed by the extra coverage.
* t/cond5.sh, t/auxdir-autodetect.sh: Cosmetic changes to avoid
spuriously triggering the maintainer checks due to the
enhanced coverage.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaintcheck: avoid a couple of spurious failures
Stefano Lattarini [Fri, 4 May 2012 16:09:02 +0000 (18:09 +0200)]
maintcheck: avoid a couple of spurious failures

* t/objcxx-deps.sh, t/objcxx-minidemo.sh: In C++ files, use
"std::cout <<", not "cout <<", to avoid triggering a spurious
failure by the syntax check 'sc_tests_here_document_format'.

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

* maint:
  tests: avoid spurious failure on missing Obj C/C++ compiler
  objc, objc++: test support for compilation flags
  objc, objc++: add stress test
  objc, objc++: test automatic dependency tracking
  objc: reorganize basic tests
  objc++, objc: add first semantic tests
  objc++: add first basic test
  news: announce initial support for Objective C++
  objc++: test support for '.mm' suffix in _SOURCES entries
  objc++: add documentation
  objc++: initial support for Objective C++

12 years agoMerge branch 'objc++' into maint
Stefano Lattarini [Fri, 4 May 2012 15:32:08 +0000 (17:32 +0200)]
Merge branch 'objc++' into maint

* objc++:
  tests: avoid spurious failure on missing Obj C/C++ compiler

12 years agotests: avoid spurious failure on missing Obj C/C++ compiler
Stefano Lattarini [Fri, 4 May 2012 15:31:06 +0000 (17:31 +0200)]
tests: avoid spurious failure on missing Obj C/C++ compiler

* t/objc-megademo.sh: Arrange the test to SKIP, not FAIL, if there is
no Objective C or no Objective C++ compiler.  Since we are at it, remove
some checks that were actually testing Autoconf (not Automake) behaviour.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'objc++' into maint
Stefano Lattarini [Fri, 4 May 2012 11:24:23 +0000 (13:24 +0200)]
Merge branch 'objc++' into maint

* objc++:
  objc, objc++: test support for compilation flags
  objc, objc++: add stress test
  objc, objc++: test automatic dependency tracking
  objc: reorganize basic tests
  objc++, objc: add first semantic tests
  objc++: add first basic test
  news: announce initial support for Objective C++
  objc++: test support for '.mm' suffix in _SOURCES entries
  objc++: add documentation
  objc++: initial support for Objective C++

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agodist: don't bother putting README first in $(DIST_COMMON)
Stefano Lattarini [Thu, 3 May 2012 15:30:56 +0000 (17:30 +0200)]
dist: don't bother putting README first in $(DIST_COMMON)

Comments on some of our automake-time pre-processing of $(DIST_COMMON)
said that it was done in order to "put README first because it then
becomes easier to make a Usenet-compliant shar file".  But such a
format is hardly relevant anymore, and not worth the (albeit small)
added complexity.

* automake.in (handle_dist): Don't sort @dist_common.
(for_dist_common): Delete this function, is not used anymore.
* lib/am/distdir.am (DISTFILES): Remove obsolete comment.
* t/distcom4.sh: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoMerge branch 'always-support-silent-rules'
Stefano Lattarini [Wed, 2 May 2012 16:15:41 +0000 (18:15 +0200)]
Merge branch 'always-support-silent-rules'

* always-support-silent-rules:
  silent rules: support for them is always active now

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

* maint:
  news: document improvement in parallel-tests performance
  tests: fix spurious failure due to autom4te caching
  news: fix typos
  aclocal: error out again on unrecognized arguments
  parallel-tests: save few forks when possible
  parallel-tests: optimize global log creation
  parallel-tests: optimize 'recheck' target for speed
  coverage: add performance tests on some parallel-tests aspects

12 years agonews: document improvement in parallel-tests performance
Stefano Lattarini [Wed, 2 May 2012 16:04:25 +0000 (18:04 +0200)]
news: document improvement in parallel-tests performance

* NEWS: Document the improved performances of the parallel-tests targets
'check' and 'recheck'. See recent commits:

  - v1.12-20-gf5733aa of 2012-04-26,
    "parallel-tests: optimize 'recheck' target for speed"

  - v1.12-21-g5eeb366 of 2012-02-26,
    "parallel-tests: optimize global log creation"

  - v1.12-22-g4c2dd6e of 2012-04-30,
    "parallel-tests: save few forks when possible"

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years ago tests: fix spurious failure due to autom4te caching
Stefano Lattarini [Wed, 2 May 2012 15:47:56 +0000 (17:47 +0200)]
 tests: fix spurious failure due to autom4te caching

Reported by Peter Breitenlohner :
<http://lists.gnu.org/archive/html/automake-patches/2012-05/msg00045.html>

* t/suffix.sh: Remove stale autom4te.cache directories, to prevent racy,
spurious failures (using 'aclocal --force' was not enough, since the cache
was still picked up by the following automake call).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoobjc, objc++: test support for compilation flags
Stefano Lattarini [Tue, 1 May 2012 13:04:37 +0000 (15:04 +0200)]
objc, objc++: test support for compilation flags

* t/objc-flags.sh, t/objcxx-flags.sh: New tests.
* t/list-of-tests.mk: Add them.

Co-authored-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>