From dd09c4ce45f2971a30e9abb17f2bd7cde1554261 Mon Sep 17 00:00:00 2001 From: Takayuki Shimizukawa Date: Wed, 7 Nov 2012 19:24:05 +0900 Subject: [PATCH] Closes #1024: Makefile improve error message if Sphinx is not found --- sphinx/quickstart.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index b4f634384c..fbaee9ef53 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