| # Minimal makefile for Sphinx documentation |
| # use bash safe mode, fail quickly |
| SHELL = bash -e -o pipefail |
| # You can set these variables from the command line. |
| SPHINXBUILD = sphinx-build |
| .PHONY: help Makefile lint |
| # Put it first so that "make" without argument is like "make help". |
| source $</bin/activate ; set -u ;\ |
| $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
| virtualenv -p python3 $@ ;\ |
| source $@/bin/activate ;\ |
| pip install -r requirements.txt |
| source $</bin/activate ; set -u ;\ |
| doc8 --max-line-length 119 \ |
| $$(find . -name \*.rst ! -path "*doc_venv*") |
| # Catch-all target: route all unknown targets to Sphinx using the new |
| # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). |
| source $</bin/activate ; set -u ;\ |
| $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |