From 937054980197b422ce9ed8efd520c22ec579d880 Mon Sep 17 00:00:00 2001 From: Shawn Wilson Date: Tue, 14 Mar 2017 05:34:30 -0600 Subject: [PATCH] saw_031417_2 - Fix over-broad Sphinx dependency check. --- CHANGELOG | 2 ++ Makefile | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a6a352f..740a945 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ Copyright (C) 2017 Alpha Griffin @%@~LICENSE~@%@ +saw_031417_2 - Fix over-broad Sphinx dependency check. + saw_031417_1 - Building up a Makefile; utilizing Sphinx for documentation. saw_030917_1 - Add instructions for making source/binary distributions. diff --git a/Makefile b/Makefile index 3682cc0..119ece0 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,6 @@ SPHINXBUILD = sphinx-build PAPER = DOCDIR = doc -# 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. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter @@ -125,22 +120,28 @@ docs_clean: rm -rf $(DOCDIR)/man rm -rf $(DOCDIR)/coverage -html: +# User-friendly check for sphinx-build +sphinx: + 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 + +html: sphinx $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCDIR)/html @echo @echo "Build finished. The HTML pages are in $(DOCDIR)/html." -text: +text: sphinx $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(DOCDIR)/text @echo @echo "Build finished. The text files are in $(DOCDIR)/text." -man: +man: sphinx $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(DOCDIR)/man @echo @echo "Build finished. The manual pages are in $(DOCDIR)/man." -coverage: +coverage: sphinx $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(DOCDIR)/coverage @echo "Testing of coverage in the sources finished, look at the " \ "results in $(DOCDIR)/coverage/python.txt."