From 1f8cac4ff1aafd3999746b91ecb7bfa1bfb01894 Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Thu, 20 Aug 2009 23:35:37 +0200 Subject: [PATCH] doc/Makefile: detect rst2man errors Make couldn't detect rst2man errors when it wasn't the last command, so empty man page files would be installed. --- doc/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 02f5fef365..ad8e1c3850 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -21,11 +21,13 @@ hg.1.gendoc.txt: gendoc.py ../mercurial/commands.py ../mercurial/help.py ${PYTHON} gendoc.py > $@ %: %.txt common.txt + $(RST2MAN) $*.txt > $*.tmp # add newline after all literal blocks and fix backslash escape - $(RST2MAN) $*.txt \ - | sed -e 's/^\.fi$$/.fi\n/' \ - | sed -e 's/\\fB\\\\fP/\\fB\\e\\fP/' \ - > $* + sed \ + -e 's/^\.fi$$/.fi\n/' \ + -e 's/\\fB\\\\fP/\\fB\\e\\fP/' \ + $*.tmp > $* + rm $*.tmp %.html: %.txt common.txt $(RST2HTML) $*.txt > $*.html