[commit: ghc] master: sphinx: Don't share doctrees between targets (fa5eabe)
git at git.haskell.org
git at git.haskell.org
Sat Oct 10 13:39:39 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/fa5eabec43a71546afba6dec7508ae5afb23b805/ghc
>---------------------------------------------------------------
commit fa5eabec43a71546afba6dec7508ae5afb23b805
Author: Ben Gamari <ben at smart-cactus.org>
Date: Sat Oct 10 15:12:59 2015 +0200
sphinx: Don't share doctrees between targets
Sphinx may trip over itself when multiple instances are run in parallel.
Fixes #10950.
>---------------------------------------------------------------
fa5eabec43a71546afba6dec7508ae5afb23b805
rules/sphinx.mk | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/rules/sphinx.mk b/rules/sphinx.mk
index 87b57d6..5a3c7ce 100644
--- a/rules/sphinx.mk
+++ b/rules/sphinx.mk
@@ -13,13 +13,16 @@
# Build Sphinx documentation
+# We are careful not to use the same directory the doctree files for the
+# various Sphinx targets as make may run them in parallel (see #10950).
+
define sphinx
$(call trace, sphinx($1,$2))
$(call profStart, sphinx($1,$2))
# $1 = dir
# $2 = docname
-$(call clean-target,$1,sphinx,$1/.doctrees $1/build-html/ $1/build-pdf $1/$2.pdf)
+$(call clean-target,$1,sphinx,$1/.doctrees-html/ $1/.doctrees-pdf/ $1/build-html/ $1/build-pdf/ $1/$2.pdf)
# empty "all_$1" target just in case we're not building docs at all
$(call all-target,$1,)
@@ -37,7 +40,7 @@ html : html_$1
ifneq "$$(BINDIST)" "YES"
$1/build-html/$2/index.html: $1/conf.py $$($1_RST_SOURCES)
- $(SPHINXBUILD) -b html -d $1/.doctrees $(SPHINXOPTS) $1 $1/build-html/$2
+ $(SPHINXBUILD) -b html -d $1/.doctrees-html $(SPHINXOPTS) $1 $1/build-html/$2
endif
@@ -54,7 +57,7 @@ pdf : pdf_$1
ifneq "$$(BINDIST)" "YES"
$1/$2.pdf: $$($1_RST_SOURCES)
- $(SPHINXBUILD) -b latex -d $1/.doctrees $(SPHINXOPTS) $1 $1/build-pdf/$2
+ $(SPHINXBUILD) -b latex -d $1/.doctrees-pdf $(SPHINXOPTS) $1 $1/build-pdf/$2
cd $1/build-pdf/$2 ; xelatex $2.tex
cd $1/build-pdf/$2 ; xelatex $2.tex
cp $1/build-pdf/$2/$2.pdf $1/$2.pdf
More information about the ghc-commits
mailing list