-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathMakefile
46 lines (36 loc) · 1.33 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
.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)/gallery/
rm -f $(docs_dir)/sg_execution_times.rst
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 copy-gallery-videos
# 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 \
-D plot_gallery=0 \
--ignore $(docs_dir)"/gallery/*" \
--ignore $(docs_dir)"/jupyter_execute/*" \
--open-browser \
--port=0 \
$(SPHINXOPTS)
html-noplot: clean
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -D plot_gallery=0 -b html docs/ docs/_build $(SPHINXOPTS)
linkcheck-files:
NAPARI_APPLICATION_IPY_INTERACTIVE=0 sphinx-build -b linkcheck -D plot_gallery=0 --color docs/ docs/_build ${FILES} $(SPHINXOPTS)
copy-gallery-videos:
rsync -rupE docs/gallery/images docs/_build/gallery