summaryrefslogtreecommitdiff
path: root/lib/am/check.am
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-02-14 21:23:04 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-02-14 21:23:31 +0100
commitb2c1adfe1e118ed8fb5fc68ced68ef69ea39b543 (patch)
treec7927c9f1f4a234e92b372ac4da16944add27837 /lib/am/check.am
parentff8269e114bcee4070b8837c1e8715dd5c22d04f (diff)
downloadautomake-b2c1adfe1e118ed8fb5fc68ced68ef69ea39b543.tar.gz
check: fix test-suite.log formatting with NetBSD sed
* lib/am/check.am (am__rst_section): Tweak to ensure en extra final newline is printed also with NetBSD sed. Issue revealed by a failure of 'test-metadata-global-result.test'. * tests/rst-formatting.test: New test, checking the internal variables '$(am__rst_title)' and '$(am__rst_section)'. * tests/list-of-tests.mk: Add it.
Diffstat (limited to 'lib/am/check.am')
-rw-r--r--lib/am/check.am4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/am/check.am b/lib/am/check.am
index 777cb6ffc..bd9f5c2b8 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -57,8 +57,8 @@ include inst-vars.am
## (among them, TAP).
# Restructured Text title and section.
-am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//'
-am__rst_section = sed 'p;s/./=/g;p;g'
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+am__rst_section = { sed 'p;s/./=/g;' && echo; }
# Solaris 10 'make', and several other traditional 'make' implementations,
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it