|
5 | 5 |
|
6 | 6 | # You can set these variables from the command line.
|
7 | 7 | PYTHON = python3
|
8 |
| -SPHINXBUILD = sphinx-build |
9 |
| -BLURB = $(PYTHON) -m blurb |
| 8 | +VENVDIR = ./venv |
| 9 | +SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build |
| 10 | +BLURB = PATH=$(VENVDIR)/bin:$$PATH blurb |
10 | 11 | PAPER =
|
11 | 12 | SOURCES =
|
12 | 13 | DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
|
@@ -118,11 +119,12 @@ htmlview: html
|
118 | 119 | $(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
|
119 | 120 |
|
120 | 121 | clean:
|
121 |
| - -rm -rf build/* venv/* |
| 122 | + -rm -rf build/* $(VENVDIR)/* |
122 | 123 |
|
123 | 124 | venv:
|
124 |
| - $(PYTHON) -m venv venv |
125 |
| - ./venv/bin/python3 -m pip install -U Sphinx blurb |
| 125 | + $(PYTHON) -m venv $(VENVDIR) |
| 126 | + $(VENVDIR)/bin/python3 -m pip install -U Sphinx blurb |
| 127 | + @echo "The venv has been created in the $(VENVDIR) directory" |
126 | 128 |
|
127 | 129 | dist:
|
128 | 130 | rm -rf dist
|
@@ -174,15 +176,20 @@ serve:
|
174 | 176 | ../Tools/scripts/serve.py build/html
|
175 | 177 |
|
176 | 178 | # Targets for daily automated doc build
|
| 179 | +# By default, Sphinx only rebuilds pages where the page content has changed. |
| 180 | +# This means it doesn't always pick up changes to preferred link targets, etc |
| 181 | +# To ensure such changes are picked up, we build the published docs with |
| 182 | +# `-E` (to ignore the cached environment) and `-a` (to ignore already existing |
| 183 | +# output files) |
177 | 184 |
|
178 | 185 | # for development releases: always build
|
179 | 186 | autobuild-dev:
|
180 |
| - make dist SPHINXOPTS='$(SPHINXOPTS) -A daily=1 -A versionswitcher=1' |
| 187 | + make dist SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A versionswitcher=1' |
181 | 188 | -make suspicious
|
182 | 189 |
|
183 | 190 | # for quick rebuilds (HTML only)
|
184 | 191 | autobuild-dev-html:
|
185 |
| - make html SPHINXOPTS='$(SPHINXOPTS) -A daily=1 -A versionswitcher=1' |
| 192 | + make html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A versionswitcher=1' |
186 | 193 |
|
187 | 194 | # for stable releases: only build if not in pre-release stage (alpha, beta)
|
188 | 195 | # release candidate downloads are okay, since the stable tree can be in that stage
|
|
0 commit comments