# Makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS    =
SPHINXBUILD   = sphinx-build

# Internal variables.
ALLSPHINXOPTS   = -d ../doctrees $(SPHINXOPTS) .

all: html text

help:
	@echo "Please use \`make <target>' where <target> is one of"
	@echo "  html      to make standalone HTML files"
	@echo "  text      to make standalone text files"
	@echo "  doctest   to run doctests"

clean:
	-rm -rf ../{doctrees,html,text,doctest}

html:
	mkdir -p ../html ../doctrees _static _template
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ../html
	@echo
	@echo "Build finished. The HTML pages are in ../html."

text:
	mkdir -p ../text ../doctrees
	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) ../text
	@echo
	@echo "Build finished. The text pages are in ../text."

doctest:
	mkdir -p ../doctrees ../doctest
	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) ../doctest
