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 =
|
||||
BUILDDIR = %(rbuilddir)s
|
||||
|
||||
ifeq ($(shell $(SPHINXBUILD) 2> /dev/null; echo $$?), 127)
|
||||
define MSG
|
||||
|
||||
|
||||
The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||
installed, then set the SPHINXBUILD environment variable to point
|
||||
to the full path of the 'sphinx-build' executable. Alternatively you
|
||||
may add the Sphinx directory to PATH.
|
||||
|
||||
If you don't have Sphinx installed, grab it from
|
||||
http://sphinx-doc.org/
|
||||
endef
|
||||
$(error $(MSG))
|
||||
# User-friendly check for sphinx-build
|
||||
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
||||
$(error \
|
||||
The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx \
|
||||
installed, then set the SPHINXBUILD environment variable to point \
|
||||
to the full path of the '$(SPHINXBUILD)' executable. Alternatively you \
|
||||
can add the directory with the executable to your PATH. \
|
||||
If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
||||
endif
|
||||
|
||||
# Internal variables.
|
||||
|
Loading…
Reference in New Issue
Block a user