2013-03-12 17:14:02 +04:00
|
|
|
# Makefile for Sphinx documentation
|
|
|
|
|
2018-07-20 16:55:59 +03:00
|
|
|
SPHINXOPTS = -n -W
|
2013-03-12 17:14:02 +04:00
|
|
|
SPHINXBUILD = sphinx-build
|
|
|
|
BUILDDIR = _build
|
2018-07-20 16:55:59 +03:00
|
|
|
SOURCEDIR = docs
|
2013-03-12 17:14:02 +04:00
|
|
|
|
2014-08-26 17:57:39 +04:00
|
|
|
# User-friendly check for sphinx-build
|
|
|
|
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
2017-11-28 17:40:08 +03:00
|
|
|
$(error Sphinx not found. Run 'pip install -r requirements/docs.txt' first.)
|
2014-08-26 17:57:39 +04:00
|
|
|
endif
|
|
|
|
|
2017-11-28 17:21:22 +03:00
|
|
|
.PHONY: help clean html livehtml
|
2013-03-12 17:14:02 +04:00
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "Please use \`make <target>' where <target> is one of"
|
|
|
|
@echo " html to make standalone HTML files"
|
2017-11-28 18:53:57 +03:00
|
|
|
@echo " livehtml to start the live-reloading web server"
|
2013-03-12 17:14:02 +04:00
|
|
|
|
|
|
|
clean:
|
2018-07-27 19:41:10 +03:00
|
|
|
rm -rf ./$(BUILDDIR)/
|
2013-03-12 17:14:02 +04:00
|
|
|
|
|
|
|
html:
|
2018-07-20 16:55:59 +03:00
|
|
|
$(SPHINXBUILD) -b html $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)"
|
2013-03-12 17:14:02 +04:00
|
|
|
@echo
|
2017-11-28 17:29:22 +03:00
|
|
|
@echo "Build finished. The HTML pages are in $(BUILDDIR)."
|
2013-03-12 17:14:02 +04:00
|
|
|
|
2016-05-31 22:34:26 +03:00
|
|
|
livehtml:
|
2018-07-20 16:55:59 +03:00
|
|
|
sphinx-autobuild -b html --poll $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR) -B -p 8001
|