From 7e4c1d2b36374549369be15540a60302edefe33f Mon Sep 17 00:00:00 2001 From: John Wiggins Date: Mon, 7 Sep 2015 18:33:55 +0200 Subject: [PATCH] Allow a cache directory to be passed to the docs Makefile --- doc/Makefile | 3 ++- tools/travis_script.sh | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 82478f07..589e2937 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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 diff --git a/tools/travis_script.sh b/tools/travis_script.sh index 945f6a49..e6ca59c4 100755 --- a/tools/travis_script.sh +++ b/tools/travis_script.sh @@ -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"