Skip to content

Commit 65b95d5

Browse files
committed
Doc/Makefile: fix race condition in latex target
When running `make -j`, the `_ensure-sphinxcontrib-svg2pdfconverter` and `build` prerequisites of the `latex` target could execute in parallel. If `build` started before the venv was created by `_ensure-sphinxcontrib-svg2pdfconverter`, `sphinx-build` would not be found and the build would fail. Fix this by removing `build` from the prerequisites and invoking it explicitly from the recipe, ensuring the venv is fully set up before the Sphinx build begins.
1 parent 267e1c1 commit 65b95d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ htmlhelp: build
8888
"build/htmlhelp/pydoc.hhp project file."
8989

9090
.PHONY: latex
91-
latex: _ensure-sphinxcontrib-svg2pdfconverter
9291
latex: BUILDER = latex
93-
latex: build
92+
latex: _ensure-sphinxcontrib-svg2pdfconverter
93+
$(MAKE) build BUILDER=$(BUILDER)
9494
@echo "Build finished; the LaTeX files are in build/latex."
9595
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
9696
"run these through (pdf)latex."

0 commit comments

Comments
 (0)