platform/upstream/automake.git
11 years agocompat: reinstate AM_PROG_MKDIR_P, for gettext
Jim Meyering [Mon, 22 Oct 2012 14:14:49 +0000 (16:14 +0200)]
compat: reinstate AM_PROG_MKDIR_P, for gettext

Do not remove AM_PROG_MKDIR_P just yet.

gettext (latest from git) still AC_REQUIRE's AM_PROG_MKDIR_P via its
intl.m4 and po.m4 files, which are pulled into *many* projects.

When I try to build one of those projects (coreutils) using the latest
from automake.git/master, I see this failure:

    $ aclocal -I m4
    configure.ac:477: warning: AM_PROG_MKDIR_P is m4_require'd \
      but not m4_defun'd
    m4/po.m4:23: AM_PO_SUBDIRS is expanded from...
    m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
    configure.ac:477: the top level

That is because AM_PROG_MKDIR_P was removed (via commit
v1.12-20-g8a1c64f) in preparation for the next release of automake.

* NEWS: Remove the paragraph that announced the removal of
AM_PROG_MKDIR_P.
* Makefile.am (dist_automake_ac_DATA): Add m4/mkdirp.m4.
* m4/mkdirp.m4: Re-add file.
* t/mkdirp-deprecation.sh: Likewise.
* t/list-of-tests.mk: Add it.
* automake.in: Restore removed code, and adjust comments, s/1.13/1.14/
to reflect new plan for removal.
* doc/automake.texi (Obsolete Macros): Restore the section, but
now with only one entry: the one for AM_PROG_MKDIR_P.

11 years agoMerge branch 'maint'
Stefano Lattarini [Tue, 2 Oct 2012 18:34:47 +0000 (20:34 +0200)]
Merge branch 'maint'

* maint:
  config headers: remove stale comment in makefile fragment
  NEWS: wording and quoting fixlets in few older entries
  config headers: don't emit rules for headers not generated by autoheader
  docs: fix minor typo: s/expending/expanding/
  sync: update files from upstream with "make fetch"
  maint: post-release minor version bump
  maint: typo fixes s/lies into/lies in/
  release: stable release 1.12.4
  NEWS: minor fix

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoconfig headers: remove stale comment in makefile fragment
Stefano Lattarini [Tue, 2 Oct 2012 14:45:37 +0000 (16:45 +0200)]
config headers: remove stale comment in makefile fragment

* lib/am/remake-hdr.am: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoNEWS: wording and quoting fixlets in few older entries
Stefano Lattarini [Tue, 2 Oct 2012 14:11:49 +0000 (16:11 +0200)]
NEWS: wording and quoting fixlets in few older entries

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoconfig headers: don't emit rules for headers not generated by autoheader
Stefano Lattarini [Fri, 28 Sep 2012 19:27:41 +0000 (21:27 +0200)]
config headers: don't emit rules for headers not generated by autoheader

This change fixed automake bug#12495.

Even if an AC_CONFIG_HEADERS invocation is passed a list of several files
as the first argument, only the first one of those file is considered by
autoheader for automatic generation of the corresponding '.in' template.
This is done on purpose, and is clearly documented in the Autoconf manual,
which (as of the 2.69 version) reads something like this:

    The autoheader program searches for the first invocation of
    AC_CONFIG_HEADERS in configure sources to determine the name of
    the template.  If the first call of AC_CONFIG_HEADERS specifies
    more than one input file name, autoheader uses the first one.

That is, an invocation like:

    AC_CONFIG_HEADERS([config.h config2.h])

should cause autoheader to generate only a 'config.h.in' template,
and not also a 'config2.h.in' one.

Accordingly, automake, when tracing AC_CONFIG_HEADERS, should generate
remake rules only for the template associated to the first input file
name passed to that macro.  In some situations, however, automake failed
to properly limit itself in this way; for example, with an input like:

    AC_CONFIG_HEADERS([config.h sub/foo.h])

in configure.ac, and with the 'sub' directory listed in the SUBDIRS
variable of the top-level Makefile, automake would erroneously generate
in 'sub/Makefile.in' a rule to remake the 'foo.h.in' template by
invoking autoheader.

This issue was likely introduced in commit 'Release-1-8-23-g262bb92'
of 2004-01-05.

* NEWS: Update.
* doc/automake.texi (Optional): Improve wording in the description of
hat rules automake generates in response to an 'AC_CONFIG_HEADERS'
invocation.
* lib/am/remake-hdr.am: Only emit autoheader-invoking remake rules for
the %CONFIG_HIN% template if that corresponds to the first argument of
AC_CONFIG_HEADERS, as explaned above.  Do so using the automake-time
conditional %?FIRST-HDR%, that is properly passed ...
* automake.in (handle_configure): ... from a 'file_contents' invocation
in here.
* t/autohdr-subdir-pr12495.sh: New test.
* t/list-of-tests.mk: Add it.
* THANKS: Update.

Helped-by: Hib Eris <hib@hiberis.nl>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agodocs: fix minor typo: s/expending/expanding/
Stefano Lattarini [Thu, 27 Sep 2012 07:43:27 +0000 (09:43 +0200)]
docs: fix minor typo: s/expending/expanding/

* doc/automake.texi (Wildcards): Here.  Fixes automake bug#12516.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agosync: update files from upstream with "make fetch"
Stefano Lattarini [Tue, 18 Sep 2012 11:57:51 +0000 (13:57 +0200)]
sync: update files from upstream with "make fetch"

* lib/texinfo.tex: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agomaint: post-release minor version bump
Stefano Lattarini [Tue, 18 Sep 2012 11:55:55 +0000 (13:55 +0200)]
maint: post-release minor version bump

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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agomaint: typo fixes s/lies into/lies in/
Jim Meyering [Sun, 23 Sep 2012 16:22:30 +0000 (18:22 +0200)]
maint: typo fixes s/lies into/lies in/

11 years agorelease: stable release 1.12.4 v1.12.4
Stefano Lattarini [Mon, 17 Sep 2012 18:14:07 +0000 (20:14 +0200)]
release: stable release 1.12.4

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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoNEWS: minor fix
Stefano Lattarini [Mon, 17 Sep 2012 18:31:53 +0000 (20:31 +0200)]
NEWS: minor fix

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agofix typos in mk-dirp.m4
Jim Meyering [Wed, 12 Sep 2012 15:31:24 +0000 (17:31 +0200)]
fix typos in mk-dirp.m4

* t/gettext-macros.sh: Fix typo in name of macro emitted into
mk-dirp.m4: s/AM_MKDIR_P/AM_PROG_MKDIR_P/,
and as Stefano Lattarini noted, also fix this typo:
s/AC_MKDIR_P/AC_PROG_MKDIR_P/.

11 years agotags: automake bug bug#12372 is fixed
Stefano Lattarini [Tue, 11 Sep 2012 09:31:20 +0000 (11:31 +0200)]
tags: automake bug bug#12372 is fixed

It has been fixed as a side effect of the overhauling of tags support.

* t/list-of-tests.mk (XFAIL_TESTS): No longer list 'tags-pr12372.sh'.
* NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoMerge branch 'maint'
Stefano Lattarini [Tue, 11 Sep 2012 09:24:51 +0000 (11:24 +0200)]
Merge branch 'maint'

* maint:
  coverage: better exposure for automake bug#12372 (tags-related)
  coverage: expose automake bug#12372 (tags-related)

11 years agocoverage: better exposure for automake bug#12372 (tags-related)
Stefano Lattarini [Tue, 11 Sep 2012 09:15:41 +0000 (11:15 +0200)]
coverage: better exposure for automake bug#12372 (tags-related)

Alas, in contrast with what is said in the commit message of previous
commit 'v1.12.3-14-g94b7b8e', that bug is still present also in the
current maint branch (which will become automake version 1.12.4); it
is just that it only triggers when a _SOURCES variable contains only
files with custom extension.

* t/tags-pr12372.sh: Extend.
* t/list-of-tests.mk: Add it.

Suggested-by: Юрий Пухальский <aikipooh@gmail.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agocoverage: expose automake bug#12372 (tags-related)
Stefano Lattarini [Fri, 7 Sep 2012 08:42:42 +0000 (10:42 +0200)]
coverage: expose automake bug#12372 (tags-related)

That bug is somehow already been fixed in the latest automake
version (1.12.4); but exercise it anyway in the testsuite, to
ensure we won't regress.

* t/tags-pr12372.sh: New test.
* t/list-of-tests.mk: Add it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoMerge branch 'maint'
Stefano Lattarini [Wed, 5 Sep 2012 12:40:52 +0000 (14:40 +0200)]
Merge branch 'maint'

* maint:
  sync: update files from upstream with "make fetch"
  news: cygnus will be removed in automake 1.13
  news: some changes for 1.13 has been "de-planned"
  news: report that the have seen fixlets after 1.12.3
  warns: enable category 'obsolete' by default

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agosync: update files from upstream with "make fetch"
Stefano Lattarini [Wed, 5 Sep 2012 12:33:31 +0000 (14:33 +0200)]
sync: update files from upstream with "make fetch"

* lib/texinfo.tex: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agonews: cygnus will be removed in automake 1.13
Stefano Lattarini [Wed, 5 Sep 2012 12:32:35 +0000 (14:32 +0200)]
news: cygnus will be removed in automake 1.13

* NEWS (Future backward-incompatibilities): So document it here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agonews: some changes for 1.13 has been "de-planned"
Stefano Lattarini [Wed, 5 Sep 2012 12:29:33 +0000 (14:29 +0200)]
news: some changes for 1.13 has been "de-planned"

* NEWS (Future backward-incompatibilities): The planned Automake release
1.13 already has too much stuff on its plate; so we are not going to
In Automake 1.13, we are definitely not going to change the exact order
in which the directories in the aclocal macro search path are looked up.
Also, experience and user feedback have shown that the "obsolescent"
two-arguments invocation for AM_INIT_AUTOMAKE:

    AM_INIT_AUTOMAKE(PACKAGE-NAME, PACKAGE-VERSION)

is still useful (until at least Autoconf is fixed to offer better support
for "dynamically" package versions), so we are not going to remove
support for that usage in Automake 1.13.  For more details, see commit
v1.12.2-245-g2abe183 of 2012-08-24, "AM_INIT_AUTOMAKE: allow obsolescent
two-args invocation once again".
(New in 1.12.1): Adjust accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agonews: report that the have seen fixlets after 1.12.3
Stefano Lattarini [Wed, 5 Sep 2012 12:19:28 +0000 (14:19 +0200)]
news: report that the have seen fixlets after 1.12.3

* NEWS: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agowarns: enable category 'obsolete' by default
Stefano Lattarini [Tue, 4 Sep 2012 12:50:49 +0000 (14:50 +0200)]
warns: enable category 'obsolete' by default

No surprise that our users were bitten by backward-incompatible changes
especially hard: the warnings in the 'obsolete' category, that might
have informed them of the upcoming incompatibilities, and help them to
prepare for the transition, where not enabled by default!

* NEWS, doc/automake.texi: Update.
* lib/Automake/ChannelDefs.pm: Enable warnings in the category 'obsolete'
by default.
* t/warnings-obsolete-default.sh: New test.
* t/list-of-tests.mk: Add it.
* t/backcompat.sh: Use 'configure.ac' rather than 'configure.in' as
autoconf input file, to avoid spurious aclocal errors.
* t/backcompat2.sh: Likewise.
* t/backcompat3.sh: Likewise.
* t/backcompat5.sh: Add '-Wno-obsolete' when invoking aclocal.  Adjust
heading comments.
* t/backcompat6.sh: Likewise.
* t/cygnus-imply-foreign.sh:  Add '-Wno-obsolete' when invoking automake.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: fix a maintainer-check failure ('Exit' used instead of 'exit')
Stefano Lattarini [Tue, 28 Aug 2012 08:58:37 +0000 (10:58 +0200)]
tests: fix a maintainer-check failure ('Exit' used instead of 'exit')

* t/lisp-loadpath.sh: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoMerge branch 'maint'
Stefano Lattarini [Tue, 28 Aug 2012 08:00:45 +0000 (10:00 +0200)]
Merge branch 'maint'

* maint:
  sync: update files from upstream with "make fetch"
  automake: don't define many identical 'lang_*_rewrite' subroutines
  coverage: bugs #8844 and #9933 (already fixed by Akim's work on ylwrap)

11 years agosync: update files from upstream with "make fetch"
Stefano Lattarini [Tue, 28 Aug 2012 07:59:22 +0000 (09:59 +0200)]
sync: update files from upstream with "make fetch"

* lib/config.guess, lib/config.sub: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoautomake: don't define many identical 'lang_*_rewrite' subroutines
Stefano Lattarini [Wed, 6 Jun 2012 07:52:22 +0000 (09:52 +0200)]
automake: don't define many identical 'lang_*_rewrite' subroutines

This is just a simplifying refactoring, with no semantic change intended.

Cherry-picked from the Automake-NG commit 'v1.12.1-312-g63aa4a9' of
2012-06-07.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agocoverage: bugs #8844 and #9933 (already fixed by Akim's work on ylwrap)
Stefano Lattarini [Sun, 26 Aug 2012 17:25:02 +0000 (19:25 +0200)]
coverage: bugs #8844 and #9933 (already fixed by Akim's work on ylwrap)

* t/flex-header.sh: New test, show that automake bug#8844 and bug#9933
have already been fixed by the recent-ish improvements to ylwrap (merged
with commit v1.12.2-27-gec5cb49 of 2012-07-16, "Merge branch 'yacc-work'
into maint").
* t/list-of-tests.mk: Update.

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

* maint:
  docs: don't suggest to use recursive makefile setup
  tests: fix a timestamp race in python tests
  tests: fixup: make distcheck-override-infodir pass again
  sync: update files from upstream with "make fetch"
  maint: post-release minor version bump
  release: stable release 1.12.3
  maintcheck: fix spurious warnings
  docs: fix typo: s/make install-info/make uninstall-info/
  tests: fixup: make a couple of tests executable

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoAM_INIT_AUTOMAKE: allow obsolescent two-args invocation once again
Stefano Lattarini [Fri, 24 Aug 2012 08:47:17 +0000 (10:47 +0200)]
AM_INIT_AUTOMAKE: allow obsolescent two-args invocation once again

This partially reverts commit 'v1.12-67-ge186355' of 2012-05-25,
"init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore"

Some users still need to be able to define the version number for
their package dynamically, at configure runtime.

Their user case is that, for development snapshots, they want to be
able to base the complete version of the package on the VCS revision
ID (mostly Git or Mercurial).  They could of course do so by
specifying such version dynamically in their call to AC_INIT, as is
done by several GNU packages.  But then they would need to regenerate
and re-run the configure script before each snapshot, which might be
very time-consuming for complex packages, to the point of slowing
down and even somewhat impeding development.

The situation should truly be solved in Autoconf, by allowing a way
to specify the version dynamically in a way that doesn't force the
configure script to be regenerated and re-run every time the package
version changes.  But until Autoconf has been improved to allow
this, Automake will have to support the obsolescent two-arguments
invocation for AM_INIT_AUTOMAKE, to avoid regressing the suboptimal
but working solution for the use case described above.

See also:
<http://lists.gnu.org/archive/html/automake/2012-08/msg00025.html>

* NEWS: Update.
* m4/init.m4 (AM_INIT_AUTOMAKE): Support once again invocation with
two or three arguments.
* t/aminit-moreargs-no-more.sh: Renamed ...
* t/aminit-moreargs-deprecated.sh: ... like this, and updated.
* t/nodef.sh: Recovered test, with minor adjustments.
* t/backcompat.sh: Likewise.
* t/backcompat2.sh: Likewise.
* t/backcompat3.sh: Likewise.
* t/backcompat6.sh: Likewise.
* t/list-of-tests.mk: Adjust.

Suggested-by: Bob Friesenhahn n<bfriesen@simple.dallas.tx.us>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agodocs: don't suggest to use recursive makefile setup
Stefano Lattarini [Tue, 21 Aug 2012 13:03:05 +0000 (15:03 +0200)]
docs: don't suggest to use recursive makefile setup

* doc/automake.texi (Introduction): Here, by erroneously telling that
"there should generally be one Makefile.am per directory of a project".
For reference, see commit 'v1.12.1-25-g61dfb47' of 2012-06-12, "docs:
recursive make considered harmful".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: fix a timestamp race in python tests
Adam Sampson [Thu, 16 Aug 2012 16:54:41 +0000 (18:54 +0200)]
tests: fix a timestamp race in python tests

Fixes automake bug#12210.

* t/python-missing.sh: Call aclocal and autoconf with the "--force"
option.  We need this because, on fast machines, it's possible for
'mypy.m4' and 'aclocal.m4' to end up with the same timestamp as configure,
so autoconf (without the "--force" options) wouldn't bother to rebuild it,
and would just rerun the previous AM_PATH_PYTHON test, succeeding rather
than failing as expected.
* t/python-am-path-iftrue.sh: Likewise.

Co-authored-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: fixup: make distcheck-override-infodir pass again
Peter Rosin [Tue, 14 Aug 2012 17:34:10 +0000 (19:34 +0200)]
tests: fixup: make distcheck-override-infodir pass again

Fixes Automake bug#12198.

* t/distcheck-override-infodir.sh (main.texi): Remove all leading
cruft added by commit v1.12.2-96-g133307b "maintcheck: fix spurious
warnings".

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
11 years agosync: update files from upstream with "make fetch"
Stefano Lattarini [Tue, 14 Aug 2012 11:17:57 +0000 (13:17 +0200)]
sync: update files from upstream with "make fetch"

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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agomaint: post-release minor version bump
Stefano Lattarini [Tue, 14 Aug 2012 11:09:41 +0000 (13:09 +0200)]
maint: post-release minor version bump

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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agorelease: stable release 1.12.3 v1.12.3
Stefano Lattarini [Mon, 13 Aug 2012 16:43:37 +0000 (18:43 +0200)]
release: stable release 1.12.3

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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agomaintcheck: fix spurious warnings
Stefano Lattarini [Mon, 13 Aug 2012 16:00:57 +0000 (18:00 +0200)]
maintcheck: fix spurious warnings

* t/distcheck-override-infodir.sh: Be sure that valid occurences
of the "aclocal" and "automake" strings, which can confuse the
'sc_tests_plain_automake' check, are protected by leading "#"
characters.
* t/ax/test-lib.sh: Always use '$(...)' for command subtitution,
to avoid triggering the 'sc_tests_command_subst' check; there was
still once place where `...` was used.  While at it, fix a related
comment.
* t/ax/test-defs.in ($sleep): Use creative quoting to avoid
spuriously triggering the 'sc_tests_plain_sleep' check.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agodocs: fix typo: s/make install-info/make uninstall-info/
Stefano Lattarini [Mon, 13 Aug 2012 13:03:43 +0000 (15:03 +0200)]
docs: fix typo: s/make install-info/make uninstall-info/

* doc/automake.texi (Texinfo): Here.  And a minor wording improvement
while we are at it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: fixup: make a couple of tests executable
Stefano Lattarini [Mon, 13 Aug 2012 12:38:02 +0000 (14:38 +0200)]
tests: fixup: make a couple of tests executable

* t/python-am-path-iftrue.sh: This.
* t/python-missing.sh: And this.

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

* maint:
  tests: rework tests on AM_PATH_PYTHON
  cosmetics: fix typos and references in comments
  typofix: in a test diagnostic
  readme: fixlets to HACKING

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: rework tests on AM_PATH_PYTHON
Stefano Lattarini [Mon, 13 Aug 2012 11:16:49 +0000 (13:16 +0200)]
tests: rework tests on AM_PATH_PYTHON

* t/python8.sh, t/python9.sh: Merge into ...
* t/python-am-path-iftrue.sh: ... this new test, with minor adjustments.
* t/python4.sh, t/python5.sh, t/python6.sh, t/python7.sh: Merge into ...
* t/python-missing.sh: ... this new test.
* t/python5b.sh: Rename ...
* t/python-too-old.sh: ... like this, and adjust/extend.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agocosmetics: fix typos and references in comments
Stefano Lattarini [Mon, 13 Aug 2012 10:10:46 +0000 (12:10 +0200)]
cosmetics: fix typos and references in comments

* lib/am/check.am: Here.
* doc/automake.texi: And here.
* t/*.sh: And in several of these tests.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotypofix: in a test diagnostic
Stefano Lattarini [Mon, 13 Aug 2012 09:08:43 +0000 (11:08 +0200)]
typofix: in a test diagnostic

* t/cscope.tap: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoreadme: fixlets to HACKING
Stefano Lattarini [Sun, 12 Aug 2012 19:30:56 +0000 (21:30 +0200)]
readme: fixlets to HACKING

* HACKING: Use longer "=====" lines to separate different section (this
is just eye-candy admittedly, but I prefer it).
(Release procedure): Don't tell to "update NEWS"; that should be updated
throughout the normal course of development.  Instead, tell to just check
it.  Improve description of the re-bootstrapping and rechecking procedure,
also suggesting to use "git clean" beforehand (with all due warnings!).

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

* maint:
  cleanup: remove stale references to 'lzma' option

11 years agocleanup: remove unused transform '%HAVE-MANS%'
Stefano Lattarini [Sun, 12 Aug 2012 11:43:54 +0000 (13:43 +0200)]
cleanup: remove unused transform '%HAVE-MANS%'

* automake.in (preprocess_file): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agocleanup: remove stale references to 'lzma' option
Stefano Lattarini [Fri, 10 Aug 2012 22:56:11 +0000 (00:56 +0200)]
cleanup: remove stale references to 'lzma' option

* automake.in (preprocess_file): Here.
(handle_dist): And here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 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'

11 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>
11 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>
11 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>
11 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

11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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

11 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>
11 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>
11 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>
11 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>
11 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

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

11 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>
11 years agoMerge branch 'maint'
Stefano Lattarini [Sat, 4 Aug 2012 21:45:39 +0000 (23:45 +0200)]
Merge branch 'maint'

* maint:
  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+"$@"}
  depcomp: style changes to Portland Group Compilers support
  depcomp: initial support for Portland Group Compilers

11 years agotests: fix a spurious XPASS on OpenIndiana
Stefano Lattarini [Sat, 4 Aug 2012 21:03:46 +0000 (23:03 +0200)]
tests: fix a spurious XPASS on OpenIndiana

* t/instspc.tap: Here, by isolating the $(DESTDIR) used by runs with
different "problematic strings" to prevent them to unduly interfering
with each other.  With this, the Automake testsuite finally run cleanly
on the OpenIndiana and Solaris 10 systems I have access to.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: avoid spurious failure of 't/vala-vapi.sh' on OpenIndiana
Stefano Lattarini [Sat, 4 Aug 2012 18:38:31 +0000 (20:38 +0200)]
tests: avoid spurious failure of 't/vala-vapi.sh' on OpenIndiana

* t/vala-vapi.sh: Use 'printf', not 'echo', to print strings containing
substrings like '\n', that can be interpreted like escape strings.  That
because the /bin/sh and the /bin/bash shell from OpenIndiana actually
interpret them that way:

  $ /bin/sh -c 'echo "foo\nbar"'
  foo
  bar
  $ /bin/bash -c 'echo "foo\nbar"'
  foo
  bar

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: avoid spurious failure of 't/uninstall-fail.sh' on OpenIndiana
Stefano Lattarini [Sat, 4 Aug 2012 18:06:28 +0000 (20:06 +0200)]
tests: avoid spurious failure of 't/uninstall-fail.sh' on OpenIndiana

On current OpenIndiana (based on what once was OpenSolaris 11), the shell
/bin/sh (which, differently from what happens on Solaris, is a true POSIX
shell, thus worthy of consideration) somehow manages to "eat" the
error message from 'rm' when that fails to remove a file due to lacking
permission on the parent directory:

  $ /bin/sh -c "cd unwritable-dir || { echo OOPS; exit 1; }; rm -f foo"
  $ echo rc = $?
  rc = 1
  $ /bin/bash -c "cd unwritable-dir || { echo OOPS; exit 1; }; rm -f foo"
  rm: foo not removed: Permission denied
  $ echo rc = $?
  rc = 2
  $ /bin/sh -c "cd unwritable-dir || { echo OOPS; exit 1; }; env rm -f foo"
  rm: foo not removed: Permission denied
  $ echo rc = $?
  rc = 2

That is probably due to an improper optimization, that is, the shell tries
to be smart and remove the file itself instead of invoking 'rm', but fails
spectacularly in the attempt.

* t/uninstall-fail.sh: The just-described bug was causing a spurious
failure in this test case.  Cater to thus situation, by relaxing the
test when a faulty shell is detected.  And while at it, fix and improve
an unrelated comment.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: reimplement wrappers for automake and aclocal in perl
Stefano Lattarini [Sat, 4 Aug 2012 16:36:24 +0000 (18:36 +0200)]
tests: reimplement wrappers for automake and aclocal in perl

This will allow us to avoid one extra shell invocation per automake
and aclocal invocation in our testsuite, and, more importantly, will
allow us not to worry about potential shell portability issues, at
least in those wrappers.  For an example of such a portability issue,
refer to the recent commit v1.12.2-80-g65dadf6 "tests: work around a
ksh bug w.r.t. ${1+"$@"}".

* t/wrap/automake.in, t/wrap/aclocal.in: Rewritten in perl.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: work around a ksh bug w.r.t. ${1+"$@"}
Stefano Lattarini [Sat, 4 Aug 2012 14:54:30 +0000 (16:54 +0200)]
tests: work around a ksh bug w.r.t. ${1+"$@"}

Fixes automake bug#10898.  See also the older (much older) thread:
<http://lists.gnu.org/archive/html/automake-patches/2009-12/msg00036.html>

At least the AT&T and OpenSolaris versions of the Korn shell, as well
as the /bin/sh from OpenIndiana 11, have a strange bug regarding the
expansion of ${1+"$@"}: when exactly *one empty* argument is passed to
a script run by one of this shells, inside that script ${1+"$@"} will
expand to *nothing*, rather than to to the single empty string, as
one would expect (OTOH, $# will correctly expand to 1).  This buggy
behaviour was causing a spurious failure in our testsuite (test 6 in
't/automake-cmdline.tap').  Work around it.

* t/wrap/automake.in: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agonews: document all the recent elisp-related changes and improvements
Stefano Lattarini [Sat, 4 Aug 2012 13:52:12 +0000 (15:52 +0200)]
news: document all the recent elisp-related changes and improvements

* NEWS (Elisp byte-compilation): Here.  Also notice that the recent
changes have fixed the long-standing (almost two years old!) automake
bug#7441.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agocoverage: byte-compiling elisp files in different subdirectories
Stefano Lattarini [Sat, 4 Aug 2012 13:29:21 +0000 (15:29 +0200)]
coverage: byte-compiling elisp files in different subdirectories

Where a '.el' file in a subdirectory might require a '.el' file in
another one.  This does not work out of the box, but can be made to
work with a judicious use of $(AM_ELCFLAGS) (just introduced in the
previous commit).

* t/lisp-subdir-mix.sh: New test.
* t/list-of-tests.mk: Add it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoelisp: honour AM_ELCFLAFS and ELCFLAGS in byte-compilation
Stefano Lattarini [Sat, 4 Aug 2012 12:56:27 +0000 (14:56 +0200)]
elisp: honour AM_ELCFLAFS and ELCFLAGS in byte-compilation

* lib/am/lisp.am (.el.elc): Add "$(AM_ELCFLAFS) $(ELCFLAGS)"
to the emacs command line.
* t/lisp-flags.sh: New test.
* t/list-of-tests.mk: Add it.
* doc/automake.texi (Emacs Lisp): Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoMerge branch 'depcomp-pgcc' into maint
Stefano Lattarini [Thu, 2 Aug 2012 09:41:28 +0000 (11:41 +0200)]
Merge branch 'depcomp-pgcc' into maint

* depcomp-pgcc:
  depcomp: style changes to Portland Group Compilers support
  depcomp: initial support for Portland Group Compilers

11 years agoMerge branch 'maint'
Stefano Lattarini [Mon, 30 Jul 2012 09:09:27 +0000 (11:09 +0200)]
Merge branch 'maint'

* maint:
  build: fix build in VPATH setup
  gen-tests: simplify sourcing of helper shell files

11 years agobuild: fix build in VPATH setup
Stefano Lattarini [Mon, 30 Jul 2012 09:01:09 +0000 (11:01 +0200)]
build: fix build in VPATH setup

* Makefile.am (t/ax/test-defs.sh): Ensure the 't/ax' directory exists,
before trying to create 'test-defs.sh' in there.  This is required in
VPATH builds.

Reported-by: Akim Demaille <akim@lrde.epita.fr>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agonews: fix a couple of minor formatting issues
Stefano Lattarini [Thu, 26 Jul 2012 19:02:44 +0000 (21:02 +0200)]
news: fix a couple of minor formatting issues

* NEWS (New in 1.13): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agogen-tests: simplify sourcing of helper shell files
Stefano Lattarini [Thu, 26 Jul 2012 17:40:49 +0000 (19:40 +0200)]
gen-tests: simplify sourcing of helper shell files

This is a follow-up on commit v1.12.2-49-g42fb45b, for an occurrence
of '. "$am_testauxdir"/foo.sh' that wasn't in a test script, but
rather in 'gen-testsuite-part' (ending up in the tests generated by
that script).

* gen-testsuite-part: In the generated 'depcomp*.tap' tests, use
simply:
    . depcomp.sh
rather than:
    . "$am_testauxdir/depcomp.sh"

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotypofix: in a comment in Makefile.am
Stefano Lattarini [Thu, 26 Jul 2012 16:27:15 +0000 (18:27 +0200)]
typofix: in a comment in Makefile.am

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoMerge branch 'maint'
Stefano Lattarini [Thu, 26 Jul 2012 16:16:47 +0000 (18:16 +0200)]
Merge branch 'maint'

* maint: (38 commits)
  maintcheck: fixup list of files in $(xdefs)
  tests: never source test-defs.sh directly, source test-lib.sh instead
  runtest: sanitize test environment
  tests: remove an obsolescent self test
  tests: "am_using_tap=yes" -> "am_test_protocol=tap"
  tests: protect test libs against multiple inclusion
  configure: testsuite shell can return early from "dot-sourced" files
  tests: move sanitization and "Bournification" in the generic test lib
  tests: source test defs in the generic test lib
  test defs: no need to re-add $srcdir/t/ax to $PATH
  tests: split test libs into "generic" and "automake-specific"
  test setup: move actual calling of testsuite setup in ./defs
  test setup: merge definitions of function for simple tests
  test init: refactor: new function 'am_test_setup'
  test init: refactor: move displaying of debugging info later
  test init: refactor: new function 'am_setup_testdir'
  test init: refactor: new function 'am_set_exit_traps'
  configure: testsuite shell set exit traps in shell functions
  test init: refactor: new function 'am_exit_trap'
  test init: refactor: new function 'process_requirements'
  ...

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoMerge branch 'testsuite-refactor' into maint
Stefano Lattarini [Thu, 26 Jul 2012 16:14:18 +0000 (18:14 +0200)]
Merge branch 'testsuite-refactor' into maint

* testsuite-refactor: (33 commits)
  maintcheck: fixup list of files in $(xdefs)
  tests: never source test-defs.sh directly, source test-lib.sh instead
  runtest: sanitize test environment
  tests: remove an obsolescent self test
  tests: "am_using_tap=yes" -> "am_test_protocol=tap"
  tests: protect test libs against multiple inclusion
  configure: testsuite shell can return early from "dot-sourced" files
  tests: move sanitization and "Bournification" in the generic test lib
  tests: source test defs in the generic test lib
  test defs: no need to re-add $srcdir/t/ax to $PATH
  tests: split test libs into "generic" and "automake-specific"
  test setup: move actual calling of testsuite setup in ./defs
  test setup: merge definitions of function for simple tests
  test init: refactor: new function 'am_test_setup'
  test init: refactor: move displaying of debugging info later
  test init: refactor: new function 'am_setup_testdir'
  test init: refactor: new function 'am_set_exit_traps'
  configure: testsuite shell set exit traps in shell functions
  test init: refactor: new function 'am_exit_trap'
  test init: refactor: new function 'process_requirements'
  ...

11 years agoMerge branch 'fix-pr12041' into maint
Stefano Lattarini [Thu, 26 Jul 2012 16:07:17 +0000 (18:07 +0200)]
Merge branch 'fix-pr12041' into maint

* fix-pr12041:
  tests: avoid spurious failure when running as root

11 years agomaintcheck: fixup list of files in $(xdefs)
Stefano Lattarini [Thu, 26 Jul 2012 12:16:42 +0000 (14:16 +0200)]
maintcheck: fixup list of files in $(xdefs)

syntax-checks.mk (xdefs): Adjust to recent changes: add 't/ax/test-lib.sh'
and 't/ax/test-lib.sh', remove the now-deleted 't/ax/test-init.sh'

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: never source test-defs.sh directly, source test-lib.sh instead
Stefano Lattarini [Thu, 26 Jul 2012 10:50:32 +0000 (12:50 +0200)]
tests: never source test-defs.sh directly, source test-lib.sh instead

After the recent re-organization, sourcing 'test-defs.sh' directly might
not work well and cause spurious failures or other unexpected behaviours.
We should source 'test-lib.sh' instead, which contains not more direct
code execution (only definition of shell variables/functions, or sourcing
of other '*.sh' with the same property), is protected against multiple
inclusions, and sources 'test-defs.sh' automatically in in a proper way.

* t/testsuite-summary-count.sh, t/tap-summary.sh, t/tap-summary-color.sh,
t/testsuite-summary-color.sh: Source 'test-lib.sh', not 'test-defs.sh'.
* gen-testsuite-part: Likewise, in the generated wrapper scripts.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoruntest: sanitize test environment
Stefano Lattarini [Thu, 26 Jul 2012 09:04:31 +0000 (11:04 +0200)]
runtest: sanitize test environment

* runtest.in: Here, similarly to what is done by AM_TESTS_ENVIRONMENT
in Makefile.am, unset variables that should be under the complete control
of the test framework, and that could create havoc if inherited from the
environment.  This remove the need to check against possible environment
"pollution" ...
* t/ax/test-defs.in: ... in here.
* Makefile.am (AM_TESTS_ENVIRONMENT): Add a comment about the need of
synchronization with 'runtest.in'.
* t/self-check-env-sanitize.tap: Remove as obsolete.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: remove an obsolescent self test
Stefano Lattarini [Thu, 26 Jul 2012 08:45:43 +0000 (10:45 +0200)]
tests: remove an obsolescent self test

* t/self-check-tap.sh: This.  The recent reorganization and code
moving between 'test-defs.sh' and 'test-lib.sh' has made it
brittle and prone to failures.  Since the usefulness of this self
check is extremely limited, it's not worth trying to fix it. Just
remove it.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: "am_using_tap=yes" -> "am_test_protocol=tap"
Stefano Lattarini [Thu, 26 Jul 2012 08:35:09 +0000 (10:35 +0200)]
tests: "am_using_tap=yes" -> "am_test_protocol=tap"

And similarly, "am_using_tap=no" -> "am_test_protocol=none".

The new '$am_test_protocol' name is clearer, and will allow the easy
addition of further test protocols in the future.  This is not truly
relevant for automake, but we are trying to make some parts of our
testsuite framework as general as possible, in view of a future move
to a more generic project like Gnulib.

* Makefile.am, t/ax/am-test-lib.sh, t/ax/test-defs.in, t/ax/test-lib.sh,
t/self-check-env-sanitize.tap, t/self-check-tap.sh: Adjust.
* syntax-checks.mk (sc_tests_obsolete_variables): Add 'am_using_tap' to
the list of obsolete variables to check against.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: protect test libs against multiple inclusion
Stefano Lattarini [Thu, 26 Jul 2012 10:21:40 +0000 (12:21 +0200)]
tests: protect test libs against multiple inclusion

* t/ax/test-lib.sh, t/ax/am-test-lib.sh: Return early if already sourced.
Use the witness variables '$test_lib_sourced' and '$am_test_lib_sourced',
respectively, for this purpose.
* runtest.in, Makefile.am (AM_TESTS_ENVIRONMENT): Unset 'test_lib_sourced'
and 'am_test_lib_sourced', to avoid interferences from the environment.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agoconfigure: testsuite shell can return early from "dot-sourced" files
Stefano Lattarini [Wed, 25 Jul 2012 18:40:21 +0000 (20:40 +0200)]
configure: testsuite shell can return early from "dot-sourced" files

* configure.ac: Check that the shell selected to run the test
scripts can call 'return' form within a file being sourced
with the '.' built-in.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: move sanitization and "Bournification" in the generic test lib
Stefano Lattarini [Thu, 26 Jul 2012 08:22:52 +0000 (10:22 +0200)]
tests: move sanitization and "Bournification" in the generic test lib

* t/ax/test-defs.sh: From here ...
* t/ax/test-lib.sh: ... to here.  Also move the initialization of
'$argv0' and '$me'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: source test defs in the generic test lib
Stefano Lattarini [Thu, 26 Jul 2012 08:09:04 +0000 (10:09 +0200)]
tests: source test defs in the generic test lib

* t/ax/test-lib.sh: That is, here ...
* defs: ... rather than here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotest defs: no need to re-add $srcdir/t/ax to $PATH
Stefano Lattarini [Thu, 26 Jul 2012 08:03:51 +0000 (10:03 +0200)]
test defs: no need to re-add $srcdir/t/ax to $PATH

* t/ax/test-defs.sh: Here.  That is already done by both 'runtest' and
AM_TESTS_ENVIRONMENT, and the presence of '$srcdir/t/ax' in $PATH is
anyway required, after the recent changes, for our testsuite framework
to work at all.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotests: split test libs into "generic" and "automake-specific"
Stefano Lattarini [Wed, 25 Jul 2012 20:49:02 +0000 (22:49 +0200)]
tests: split test libs into "generic" and "automake-specific"

This is the first step in the quest to merge the generically useful
parts of our test suite framework in a more generic project, like
Gnulib.  Time will tell if we'll succeed, and whether the success will
be worth the extra hassle.

* t/ax/test-init.sh: Split out ...
* t/ax/am-test-lib.sh, t/ax/test-lib.sh: ... into these two tests.
* defs, Makefile.am: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotest setup: move actual calling of testsuite setup in ./defs
Stefano Lattarini [Wed, 25 Jul 2012 19:12:30 +0000 (21:12 +0200)]
test setup: move actual calling of testsuite setup in ./defs

* t/ax/test-init.sh: Move call to 'am_test_setup' ...
* defs: ... here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotest setup: merge definitions of function for simple tests
Stefano Lattarini [Wed, 25 Jul 2012 19:04:30 +0000 (21:04 +0200)]
test setup: merge definitions of function for simple tests

* t/ax/plain-functions.sh: Delete, moving the definitions of ...
($stderr_fileno_): ... this variable ...
(warn_, fail_, skip_, skip_all_, fatal_, framework_failure_): ... and
these functions ...
* t/ax/test-init.sh: ... in here.  This allow us to use those functions
earlier in this file (instead of having to duplicate their behaviour
with inlined code).  The TAP-based tests are still able to override these
functions later to their TAP-enhanced equivalents when 'tap-functions.sh'
is sourced.
* Makefile.am (dist_noinst_DATA): Remove 't/ax/plain-functions.sh'.
* t/ax/tap-functions.sh: Adjust a comment.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotest init: refactor: new function 'am_test_setup'
Stefano Lattarini [Wed, 25 Jul 2012 18:31:47 +0000 (20:31 +0200)]
test init: refactor: new function 'am_test_setup'

* t/ax/test-init.sh (am_test_setup): Here.
Call it from the main code.  Remove other calls of functions and
settings that are now duly called by 'am_test_setup'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotest init: refactor: move displaying of debugging info later
Stefano Lattarini [Wed, 25 Jul 2012 18:25:55 +0000 (20:25 +0200)]
test init: refactor: move displaying of debugging info later

* t/ax/test-init.sh: Here, about the values of $PATH, $am_using_tap
and $am_running_installcheck.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotest init: refactor: new function 'am_setup_testdir'
Stefano Lattarini [Wed, 25 Jul 2012 18:20:09 +0000 (20:20 +0200)]
test init: refactor: new function 'am_setup_testdir'

* t/ax/test-init.sh (am_setup_testdir): Here.
Use it instead of inlining its contents in the main code.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
11 years agotest init: refactor: new function 'am_set_exit_traps'
Stefano Lattarini [Wed, 25 Jul 2012 18:17:46 +0000 (20:17 +0200)]
test init: refactor: new function 'am_set_exit_traps'

* t/ax/test-init.sh (am_set_exit_traps): Here.
(trap): Use it instead of inlining the cleanup/finalization code.

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