TAP driver: remove perl implementation (move it into contrib/)

That implementation was only meant as a standard against which the
portable awk+shell implementation was to be measured.  Now, since
Automake 1.12, the latter implementation is fully functional and
already used in the wild, and in fact feature-par with the perl
implementation.  So the perl implementation is now just slowing
down and complicating our testsuite.  Let's move it to 'contrib/'
(we don't want to remove it, in case someone is actually using it
in the wild).

* lib/tap-driver.pl: Move it ...
* contrib/tap-driver.pl: ... here.  While at it, convert quoting
`like this' to quoting 'like this', and remove an obsolescent FIXME
comment.
* lib/Makefile.inc (dist_script_DATA): Drop '%D%/tap-driver.pl'.
* Makefile.am (EXTRA_DIST): Add 'contrib/tap-driver.pl'.
* doc/automake.texi: Remove one stray reference to 'tap-driver.pl',
and reference 'tap-driver.sh' instead, as intended.
* t/ax/am-test-lib.sh ($am_tap_implementation): Delete definition and
uses.
(fetch_tap_driver): Simplify to unconditionally assume the shell+awk
implementation of the TAP driver is used.
(get_shell_script): Make more flexible so that it can cater to the
needs of 'fetch_tap_driver()'.
* t/tap-bad-prog.tap: Likewise.
* t/tap-bailout-leading-space.sh: Likewise.
* t/tap-signal.tap: Likewise.
* t/tap-test-number-0.sh: Likewise.
* t/test-driver-cond.sh: Use 'tap-driver.sh' instead of 'tap-driver.pl'.
* gen-testsuite-part (%test_generators): Do not generate sister tests
that use the perl TAP driver rather than the shell+awk one.
* NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
TAP driver: no need to invoke AC_PROG_AWK directly

It is already required by AM_INIT_AUTOMAKE anyway.

* doc/automake.texi: Adjust examples.
* t/tap-doc2.sh: Adjust documentation-tracking test.
* m4/init.m4 (AM_INIT_AUTOMAKE): Explicitly tell that the AC_PROG_AWK
requirement is also needed whenever the TAP driver is used.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
testsuite harness: report test exit status in log file

The exit status of a test should be reported in the test logs, so
that one can see at a glance whether the test has succeeded or failed,
without having to look also into the corresponding .trs file.

This fixes automake bug#11814.

* lib/test-driver: Also report the test script exit status in the
test log (as the last line).
* t/check-exit-status-reported.sh: Test this new behaviour.
* t/list-of-tests.mk: Add the new test.
* t/ax/test-lib.sh( am_exit_trap): No longer log the test exit status;
this has been made redundant by the change to 'test-driver'.  While at
it, fix an imperfect quoting.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
docs: drop a few obsolescent FIXME/TODO comments, and associated text

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Merge branches 'fix-pr11814' and 'drop-perl-tap-driver' into minor

* fix-pr11814:
  docs: drop a few obsolescent FIXME/TODO comments, and associated text
  testsuite harness: report test exit status in log file

* drop-perl-tap-driver:
  TAP driver: remove perl implementation (move it into contrib/)

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
tests: more significant names for a test

* t/install2.sh: Rename...
* t/dist-with-unreadable-makefile-fails.sh: ... like this.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
tests: some cosmetic fixes

* t/instdat.sh: Here.
* t/instdat2.sh: And here.
* t/instsh.sh: And here.
* t/instsh3.sh: And here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
tests: more significant names for some tests

* t/insh2.sh: Rename...
* t/dist-install-sh.sh: ... like this.
* t/instsh.sh: Rename...
* t/add-missing-install-sh.sh: ... like this.
* t/instsh2.sh: Rename...
* t/install-sh-unittests.sh: ... like this.
* t/instsh3.sh: Rename...
* t/install-sh-option-C.sh: ... like this.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
install-sh: be stricter in catching invalid usages

Such usages (which are rejected by GNU install as well) are:

  - options -d and -t used together;

  - argument passed to option -t must be a directory;

  - if there are two or more SOURCEFILE arguments, the
    DESTINATION argument must be a directory.

Note that we still allow the use of options -d and -T together, by
making -d take the precedence; this is for compatibility with GNU
install.

This change fixes, among other things, automake bug#15376.

* lib/install-sh: Adjust.
* t/install-sh-unittests.sh: Enhance.
* NEWS: Update.
* THANKS: Add reporter of bug#15376.

Helped-by: Tobias Hansen <thansen@debian.org>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
install-sh: a slightly better diagnostic, and tests enhancements

* lib/install-sh: When called with no non-option arguments and the '-t'
option with an argument that is not an existing directory, have the
diagnostic output complain about the lack of required arguments rather
than about the bad argument passed to '-t'.
* t/install-sh-unittests.sh: Enhance to also check diagnostic printed
in cases of expected failure.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Merge branch 'install-sh-improvements' into minor

* install-sh-improvements:
  install-sh: a slightly better diagnostic, and tests enhancements
  install-sh: be stricter in catching invalid usages
docs: make clear the JAVA primary is frozen

* doc/automake.texi: Here.  The JAVA primary is broken in several ways,
and will no longer be developed, not even for bug fixes.

See also automake bugs #9088, #8662 and #8540.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
tests: fix a spurious failure on Mac OS X

This change fixes bug#14706.

* lib/depcomp2.sh: Also cater to spurious diagnostic from GNU rm,
not only from Apple's rm.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
cosmetics: remove a couple of extra trailing white spaces

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Allow user to extend .PRECIOUS target

References:
<http://lists.freedesktop.org/archives/systemd-devel/2013-July/012155.html>
<http://lists.gnu.org/archive/html/automake/2013-07/msg00011.html>

* bin/automake.in: Adjust to ensure we handle '.PRECIOUS' the same way
we do for '.PHONY' and '.MAKE'.
* lib/Automake/Rule.pm: Likewise.
* t/precious.sh: New test.
* t/list-of-tests.mk: Add it.
* t/phony.sh: Enhance a little while at it.
* NEWS: Update.
* THANKS: Likewise.

Reported-by: Holger Hans Peter Freyther <holger@freyther.de>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Merge branch 'minor'

* minor:
  Allow user to extend .PRECIOUS target
  cosmetics: remove a couple of extra trailing white spaces
  tests: fix a spurious failure on Mac OS X
  docs: make clear the JAVA primary is frozen
  install-sh: a slightly better diagnostic, and tests enhancements
  install-sh: be stricter in catching invalid usages
  tests: more significant names for some tests
  tests: some cosmetic fixes
  tests: more significant names for a test
  docs: drop a few obsolescent FIXME/TODO comments, and associated text
  testsuite harness: report test exit status in log file
  TAP driver: no need to invoke AC_PROG_AWK directly
  TAP driver: remove perl implementation (move it into contrib/)

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
parallel-tests: avoid possible implicit "make all" in test-suite.log rule

This change fixes automake bug#16302.

* lib/am/check.am ($(TEST_SUITE_LOG)): Avoid running "make $redo_logs"
when $redo_logs expands to empty, since in that case we are actually
ending up invoking a full "make all".  That shouldn't be required, and
can cause slowdowns for people implementing their extra "laziness
wrappers" around check-TESTS (automake bug#16302).
* NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NEWS: a typofix, and better word wrapping

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
doc: fix encoding error with UTF-8 characters

* doc/automake.texi: Specify @documentencoding and
@documentlanguage, to prevent encoding errors for parts of this
input file that are UTF-8.  This also causes the .info output to
use curly quotes, which is easier to read though it does assume
UTF-8 support.
Merge branch 'micro' into minor

* micro:
  doc: fix encoding error with UTF-8 characters