summaryrefslogtreecommitdiff
path: root/sphinx/quickstart.py
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2012-11-07 19:24:05 +0900
committershimizukawa <shimizukawa@gmail.com>2012-11-07 19:24:05 +0900
commit93849ef5f6e89aeccd8b173ccc957330b6f3c292 (patch)
tree504aabbee68f074ca8b91f59324511dd883a34d5 /sphinx/quickstart.py
parent13994aaa112d0dcbecb19a405df7ebb8fb4db599 (diff)
downloadsphinx-93849ef5f6e89aeccd8b173ccc957330b6f3c292.tar.gz
Closes #1024: Makefile improve error message if Sphinx is not found
Diffstat (limited to 'sphinx/quickstart.py')
-rw-r--r--sphinx/quickstart.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index b4f63438..fbaee9ef 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -377,6 +377,21 @@ SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = %(rbuilddir)s
+ifneq ($(shell $(SPHINXBUILD) 2> /dev/null; echo $$?), 0)
+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))
+endif
+
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter