forked from spotify/klio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (42 loc) · 1.72 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXAUTOBUILD ?= sphinx-autobuild
SOURCEDIR = src
BUILDDIR = build
PORT := 8888
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) $(SOURCEDIR)
# -n for nitpick, -T for show full traceback on exception, -W to turn warnings to errors
STRICTOPTS = -n -T -W
# Put it first so that "make" without argument is like "make help".
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " linkcheck to check all external links for integrity"
@echo " spellcheck to spell check documentation"
@echo " livehtml to build and serve HTML (reloads on changes)"
@echo " stricthtml to build HTML files in 'strict' mode"
@echo " clean to clean build directory"
.PHONY: help clean html livehtml linkcheck stricthtml spellcheck
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html"
stricthtml: clean
$(SPHINXBUILD) $(STRICTOPTS) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished in strict mode. The HTML pages are in $(BUILDDIR)/html"
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
spellcheck:
$(SPHINXBUILD) -b spelling -W $(ALLSPHINXOPTS) $(BUILDDIR)/spellcheck
@echo
@echo "Spell check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/spellcheck/."
# sphinx-autobuild is required
livehtml:
$(SPHINXAUTOBUILD) -p $(PORT) -b html $(SOURCEDIR) $(BUILDDIR)/html $(O)