summaryrefslogtreecommitdiff
path: root/Documentation/Makefile
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-04-21 20:18:21 -0500
committerJunio C Hamano <gitster@pobox.com>2010-04-21 23:46:51 -0700
commitf9dae0d3e63455206c1e1e169c76aca55aeb5d90 (patch)
tree71459bc1db59d718ff2aef19a195833aafea1a25 /Documentation/Makefile
parent3d8167677ddd71405906409994a72306ba993a1f (diff)
downloadgit-f9dae0d3e63455206c1e1e169c76aca55aeb5d90.tar.gz
Documentation/Makefile: fix interrupted builds of user-manual.xml
Unlike gcc, asciidoc does not atomically write its output file or delete it when interrupted. If it is interrupted in the middle of writing an XML file, the result will be truncated input for xsltproc. XSLTPROC user-manual.html user-manual.xml:998: parser error : Premature end of data in t Take care of this case by writing to a temporary and renaming it when finished. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/Makefile')
-rw-r--r--Documentation/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 8a8a3954dc..04f69cf64e 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -264,7 +264,9 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
mv $@+ $@
user-manual.xml: user-manual.txt user-manual.conf
- $(QUIET_ASCIIDOC)$(ASCIIDOC) $(ASCIIDOC_EXTRA) -b docbook -d book $<
+ $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
+ $(ASCIIDOC) $(ASCIIDOC_EXTRA) -b docbook -d book -o $@+ $< && \
+ mv $@+ $@
technical/api-index.txt: technical/api-index-skel.txt \
technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS))
@@ -278,7 +280,9 @@ XSLT = docbook.xsl
XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
user-manual.html: user-manual.xml
- $(QUIET_XSLTPROC)xsltproc $(XSLTOPTS) -o $@ $(XSLT) $<
+ $(QUIET_XSLTPROC)$(RM) $@+ $@ && \
+ xsltproc $(XSLTOPTS) -o $@+ $(XSLT) $< && \
+ mv $@+ $@
git.info: user-manual.texi
$(QUIET_MAKEINFO)$(MAKEINFO) --no-split -o $@ user-manual.texi