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.
--- a/doc/Makefile Wed Aug 19 00:45:24 2009 +0200
+++ b/doc/Makefile Thu Aug 20 23:35:37 2009 +0200
@@ -21,11 +21,13 @@
${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