mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
quickstart: simplify the check for the "sphinx-build" command in the Makefile
The previous check called the "sphinx-build" executable on every invocation of the Makefile, which takes a nontrivial time to import all required modules. Calling "which" is much faster.
This commit is contained in:
parent
e30b1325ef
commit
663599abe9
@ -389,19 +389,14 @@ SPHINXBUILD = sphinx-build
|
|||||||
PAPER =
|
PAPER =
|
||||||
BUILDDIR = %(rbuilddir)s
|
BUILDDIR = %(rbuilddir)s
|
||||||
|
|
||||||
ifeq ($(shell $(SPHINXBUILD) 2> /dev/null; echo $$?), 127)
|
# User-friendly check for sphinx-build
|
||||||
define MSG
|
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
||||||
|
$(error \
|
||||||
|
The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx \
|
||||||
The 'sphinx-build' command was not found. Make sure you have Sphinx
|
installed, then set the SPHINXBUILD environment variable to point \
|
||||||
installed, then set the SPHINXBUILD environment variable to point
|
to the full path of the '$(SPHINXBUILD)' executable. Alternatively you \
|
||||||
to the full path of the 'sphinx-build' executable. Alternatively you
|
can add the directory with the executable to your PATH. \
|
||||||
may add the Sphinx directory to PATH.
|
If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
||||||
|
|
||||||
If you don't have Sphinx installed, grab it from
|
|
||||||
http://sphinx-doc.org/
|
|
||||||
endef
|
|
||||||
$(error $(MSG))
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Internal variables.
|
# Internal variables.
|
||||||
|
Loading…
Reference in New Issue
Block a user