Allow a cache directory to be passed to the docs Makefile

This commit is contained in:
John Wiggins
2015-09-07 18:33:55 +02:00
parent 97ff3576bb
commit 7e4c1d2b36
2 changed files with 4 additions and 5 deletions
+2 -1
View File
@@ -5,12 +5,13 @@
PYTHON ?= python
SPHINXOPTS ?=
SPHINXBUILD ?= python $(shell which sphinx-build)
SPHINXCACHE ?= build/doctrees
PAPER ?=
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
ALLSPHINXOPTS = -d $(SPHINXCACHE) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
DEST = build
.PHONY: all help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest gitwash gh-pages release_notes random_gallery
+2 -4
View File
@@ -51,10 +51,8 @@ section_end "Install.optional.dependencies"
section "Build.docs"
if [[ ($PY != 2.6) && ($PY != 3.2) ]]; then
SPHINXBUILD="python $(which sphinx-build)"
pushd doc
$SPHINXBUILD -d $HOME/.cache/sphinx -W source build/html
popd
export SPHINXCACHE=$HOME/.cache/sphinx
make html
fi
section_end "Build.docs"