diff --git a/docs/Makefile b/docs/Makefile index 9fe0af4..049c645 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -16,9 +16,12 @@ override OPTS= endif # You can set these variables from the command line. +# Prefer the tool environment kept at the root of the checkout, so that the +# documentation builds without installing its extensions system-wide. +VENV ?= ../.venv SPHINXOPTS = -n -q -j auto -T $(FAIL_WARN) $(OPTS) -SPHINXBUILD = sphinx-build -SPHINXAUTOBUILD = sphinx-autobuild +SPHINXBUILD ?= $(if $(wildcard $(VENV)/bin/sphinx-build),$(VENV)/bin/sphinx-build,sphinx-build) +SPHINXAUTOBUILD ?= $(if $(wildcard $(VENV)/bin/sphinx-autobuild),$(VENV)/bin/sphinx-autobuild,sphinx-autobuild) SPHINXPROJ = kitty SOURCEDIR = . BUILDDIR = _build