Skip to content

Commit 1a73735

Browse files
authored
Merge pull request #11790 from jsquyres/pr/sphinx-speedup
docs: speed up Sphinx processing
2 parents 4d2af25 + 1334ca3 commit 1a73735

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

docs/Makefile.am

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,24 @@
1010

1111
# We need this Makefile to be executed serially. Below, we list all
1212
# the man pages as the targets of the rule that invokes Sphinx for
13-
# dependency/generation reasons. But a *single* execution of Sphinx
14-
# will generate *all* of the man pages and HTML files. Hence, when
15-
# "make" determines that none of the man page files exist, it should
16-
# execute the Sphinx-invocation rule once, and then it will realize
17-
# that all the man pages files exist. More specifically: if someone
18-
# invokes "make -j N", we need make to not execute the
13+
# dependency/generation reasons. But a *single* execution of the make
14+
# target will generate *all* of the man pages and HTML files. Hence,
15+
# when "make" determines that none of the man page files exist, it
16+
# should execute the Sphinx-invocation rule once, and then it will
17+
# realize that all the man pages files exist. More specifically: if
18+
# someone invokes "make -j N", we need make to not execute the
1919
# Sphinx-invocation rule multiple times simultaneously. Both GNU Make
2020
# and BSD Make will honor the .NOTPARALLEL target to disable all
2121
# parallel invocation in this Makefile[.am].
22+
#
23+
# Note that even though we explicitly disable make's parallelism,
24+
# we'll use Sphinx's internal parallelism via "-j auto" -- see
25+
# SPHINX_OPTS.
2226
.NOTPARALLEL:
2327

2428
OUTDIR = _build
2529
SPHINX_CONFIG = conf.py
26-
SPHINX_OPTS ?= -W --keep-going
30+
SPHINX_OPTS ?= -W --keep-going -j auto
2731

2832
# Note: it is significantly more convenient to list all the source
2933
# files here using wildcards (vs. listing every single .rst file).

0 commit comments

Comments
 (0)