parallel-tests: avoid trailing backslashes in make recipes
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 5 Jan 2012 12:41:13 +0000 (13:41 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 6 Jan 2012 09:29:20 +0000 (10:29 +0100)
commit254227b6d5167a76f7ad96fa8a5657d81a7025c1
tree8fe22a461e351eff14f399fcd4c488b7c963620c
parentd1fbc759bfa42e5e0fe5c283dfcf9b642e815393
parallel-tests: avoid trailing backslashes in make recipes

The new testsuite-harness could generate recipes with a trailing
backslash character (possibly followed by blank characters only),
in the very common case where the user hadn't defined the special
$(AM_TESTS_FD_REDIRECT) variable.  This caused spurious syntax
errors with at least older bash versions (e.g., bash 2.05b), and
could be potentially unportable to other weaker shells.

See automake bug#10436:
  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10436>
and coreutils bug#10427:
  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10427#8>

* lib/am/check2.am: Rework line breaks so that no backslash can
be at the end of a line.
* tests/parallel-tests-trailing-bslash.test: New test.
* tests/list-of-tests.mk: Add it.

Report and diagnosis by Paul Eggert.
lib/am/check2.am
tests/list-of-tests.mk
tests/parallel-tests-trailing-bslash.test [new file with mode: 0755]