-SVNROOT = http://svn.python.org/projects
+# You can set these variables from the command line.
+SVNROOT ?= http://svn.python.org/projects
-.PHONY: help checkout html web htmlhelp clean
+ALLSPHINXOPTS = -b$(BUILDER) -dbuild/doctrees $(SPHINXOPTS) . build/$(BUILDER)
+.PHONY: help checkout update build html web htmlhelp clean
@echo "Please use \`make <target>' where <target> is one of"
svn update tools/docutils
svn update tools/pygments
- mkdir -p build/html build/doctrees
- $(PYTHON) tools/sphinx-build.py -bhtml -dbuild/doctrees . build/html
+ mkdir -p build/$(BUILDER) build/doctrees
+ $(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS)
@echo "Build finished. The HTML pages are in build/html."
- mkdir -p build/web build/doctrees
- $(PYTHON) tools/sphinx-build.py -bweb -dbuild/doctrees . build/web
@echo "Build finished; now you can run"
@echo " PYTHONPATH=tools $(PYTHON) -m sphinx.web build/web"
@echo "to start the server."
- mkdir -p build/hhp build/doctrees
- $(PYTHON) tools/sphinx-build.py -bhtmlhelp -dbuild/doctrees . build/hhp
+htmlhelp: BUILDER = htmlhelp
@echo "Build finished; now you can run HTML Help Workshop with the" \
"build/hhp/pydoc.hhp project file."