-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
43 lines (34 loc) · 1.17 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
.PHONY: docs clean
SPHINXOPTS =
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(dir $(mkfile_path))
docs_dir := $(current_dir)docs
clean:
echo clean
echo $(current_dir)
rm -rf $(docs_dir)/_build/
rm -rf $(docs_dir)/images/
mkdir $(docs_dir)/images/
cp images/*.png $(docs_dir)/images/
docs-build:
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -b html docs/ docs/_build $(SPHINXOPTS)
docs-xvfb:
NAPARI_CONFIG="" NAPARI_APPLICATION_IPY_INTERACTIVE=0 xvfb-run --auto-servernum sphinx-build -b html docs/ docs/_build $(SPHINXOPTS)
docs: clean docs-build
serve:
python -m http.server -d $(docs_dir)/_build
# Implies noplot, but no clean - call 'make clean' manually if needed
# Autogenerated paths need to be ignored to prevent reload loops
html-live:
NAPARI_APPLICATION_IPY_INTERACTIVE=0 \
sphinx-autobuild \
-b html \
docs/ \
docs/_build \
--open-browser \
--port=0 \
$(SPHINXOPTS)
html-noplot: clean
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -b html docs/ docs/_build $(SPHINXOPTS)
linkcheck-files:
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -b linkcheck --color docs/ docs/_build ${FILES} $(SPHINXOPTS)