-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (36 loc) · 1.29 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
#
# Minimal makefile for Sphinx documentation based on
# doxygen + breath-apidoc + sphinx-apidoc + sphinx-build
#
# You can set these variables from the command line.
DOC_BUILD_DIR = _build
# Sphinx
SPHINXOPTS =
SPHINX_BUILD = sphinx-build
SPHINX_QUIET = #-Q
SPHINX_BUILD_IN = .
SPHINX_BUILD_OUT = $(SPHINX_BUILD_IN)
all:
make html
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINX_BUILD) -M help "$(SPHINX_BUILD_IN)" "$(DOC_BUILD_DIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
# Create a build directory for the temporary files.
mkdir -p $(DOC_BUILD_DIR)
# Copy the config files
cp -r sphinx_source_files/* $(DOC_BUILD_DIR)
# Setup the new index.rst from Python
cd $(DOC_BUILD_DIR) && python3 update_doc_page.py && cd -
# Copy the markdown doc files
cp readme.md license.txt $(DOC_BUILD_DIR)
# Generate the final layout.
@cd $(DOC_BUILD_DIR) && $(SPHINX_BUILD) -M $@ "$(SPHINX_BUILD_IN)" "$(SPHINX_BUILD_OUT)" $(SPHINXOPTS) $(O) $(SPHINX_QUIET) && cd -
# Export the html website.
cp -r $(DOC_BUILD_DIR)/html/* .
# Clean the build
clean:
rm -fr *.html *.inv *.js _sources/ _static/ _build/