Skip to content

Commit

Permalink
saw_031417_2 - Fix over-broad Sphinx dependency check.
Browse files Browse the repository at this point in the history
  • Loading branch information
lannocc committed Mar 14, 2017
1 parent b2573be commit 9370549
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit 9370549

Please sign in to comment.