|
a |
|
b/docs/Makefile |
|
|
1 |
# Makefile for Sphinx documentation |
|
|
2 |
# |
|
|
3 |
|
|
|
4 |
# You can set these variables from the command line, and also |
|
|
5 |
# from the environment for the first two. |
|
|
6 |
SPHINXOPTS ?= |
|
|
7 |
SPHINXBUILD ?= sphinx-build |
|
|
8 |
SOURCEDIR = . |
|
|
9 |
BUILDDIR = _build |
|
|
10 |
AUTODOCDIR = api |
|
|
11 |
|
|
|
12 |
# User-friendly check for sphinx-build |
|
|
13 |
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $?), 1) |
|
|
14 |
$(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/") |
|
|
15 |
endif |
|
|
16 |
|
|
|
17 |
.PHONY: help clean Makefile |
|
|
18 |
|
|
|
19 |
# Put it first so that "make" without argument is like "make help". |
|
|
20 |
help: |
|
|
21 |
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
|
|
22 |
|
|
|
23 |
clean: |
|
|
24 |
rm -rf $(BUILDDIR)/* $(AUTODOCDIR) |
|
|
25 |
|
|
|
26 |
# Catch-all target: route all unknown targets to Sphinx using the new |
|
|
27 |
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). |
|
|
28 |
%: Makefile |
|
|
29 |
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |