build(docs): use the checkout tool environment when it exists
The documentation needs extensions that are not installed system-wide, so make html failed on a fresh shell even though the project already keeps them in the root tool environment. Falling back to sphinx-build keeps the target working when no environment is present.
This commit is contained in:
1 file changed
+5
-2
+5
-2
@@ -16,9 +16,12 @@ override OPTS=
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# You can set these variables from the command line.
|
# 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)
|
SPHINXOPTS = -n -q -j auto -T $(FAIL_WARN) $(OPTS)
|
||||||
SPHINXBUILD = sphinx-build
|
SPHINXBUILD ?= $(if $(wildcard $(VENV)/bin/sphinx-build),$(VENV)/bin/sphinx-build,sphinx-build)
|
||||||
SPHINXAUTOBUILD = sphinx-autobuild
|
SPHINXAUTOBUILD ?= $(if $(wildcard $(VENV)/bin/sphinx-autobuild),$(VENV)/bin/sphinx-autobuild,sphinx-autobuild)
|
||||||
SPHINXPROJ = kitty
|
SPHINXPROJ = kitty
|
||||||
SOURCEDIR = .
|
SOURCEDIR = .
|
||||||
BUILDDIR = _build
|
BUILDDIR = _build
|
||||||
|
|||||||
Reference in new issue
Block a user