@@ -14,15 +14,15 @@ PAPER =
14
14
SOURCES =
15
15
DISTVERSION = $(shell $(PYTHON ) tools/extensions/patchlevel.py)
16
16
REQUIREMENTS = requirements.txt
17
- SPHINXERRORHANDLING = -W
17
+ SPHINXERRORHANDLING = --fail-on-warning
18
18
19
19
# Internal variables.
20
- PAPEROPT_a4 = -D latex_elements.papersize=a4paper
21
- PAPEROPT_letter = -D latex_elements.papersize=letterpaper
20
+ PAPEROPT_a4 = --define latex_elements.papersize=a4paper
21
+ PAPEROPT_letter = --define latex_elements.papersize=letterpaper
22
22
23
- ALLSPHINXOPTS = -b $(BUILDER ) \
24
- -d build/doctrees \
25
- -j $(JOBS ) \
23
+ ALLSPHINXOPTS = --builder $(BUILDER ) \
24
+ --doctree-dir build/doctrees \
25
+ --jobs $(JOBS ) \
26
26
$(PAPEROPT_$(PAPER ) ) \
27
27
$(SPHINXOPTS ) $(SPHINXERRORHANDLING ) \
28
28
. build/$(BUILDER ) $(SOURCES )
@@ -144,7 +144,7 @@ pydoc-topics: build
144
144
145
145
.PHONY : gettext
146
146
gettext : BUILDER = gettext
147
- gettext : override SPHINXOPTS := -d build/doctrees-gettext $(SPHINXOPTS )
147
+ gettext : override SPHINXOPTS := --doctree-dir build/doctrees-gettext $(SPHINXOPTS )
148
148
gettext : build
149
149
150
150
.PHONY : htmlview
@@ -300,20 +300,20 @@ serve:
300
300
# By default, Sphinx only rebuilds pages where the page content has changed.
301
301
# This means it doesn't always pick up changes to preferred link targets, etc
302
302
# To ensure such changes are picked up, we build the published docs with
303
- # `-E` (to ignore the cached environment) and `-a` (to ignore already existing
304
- # output files)
303
+ # ``--fresh-env`` (to ignore the cached environment) and ``--write-all``
304
+ # (to ignore already existing output files)
305
305
306
306
# for development releases: always build
307
307
.PHONY : autobuild-dev
308
308
autobuild-dev : DISTVERSION = $(shell $(PYTHON ) tools/extensions/patchlevel.py --short)
309
309
autobuild-dev :
310
- $(MAKE ) dist-no-html SPHINXOPTS=' $(SPHINXOPTS) -Ea -A daily=1' DISTVERSION=$(DISTVERSION )
310
+ $(MAKE ) dist-no-html SPHINXOPTS=' $(SPHINXOPTS) --fresh-env --write-all --html-define daily=1' DISTVERSION=$(DISTVERSION )
311
311
312
312
# for HTML-only rebuilds
313
313
.PHONY : autobuild-dev-html
314
314
autobuild-dev-html : DISTVERSION = $(shell $(PYTHON ) tools/extensions/patchlevel.py --short)
315
315
autobuild-dev-html :
316
- $(MAKE ) dist-html SPHINXOPTS=' $(SPHINXOPTS) -Ea -A daily=1' DISTVERSION=$(DISTVERSION )
316
+ $(MAKE ) dist-html SPHINXOPTS=' $(SPHINXOPTS) --fresh-env --write-all --html-define daily=1' DISTVERSION=$(DISTVERSION )
317
317
318
318
# for stable releases: only build if not in pre-release stage (alpha, beta)
319
319
# release candidate downloads are okay, since the stable tree can be in that stage
0 commit comments