-
Notifications
You must be signed in to change notification settings - Fork 225
/
Copy pathMakefile
51 lines (42 loc) · 1.45 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
# Makefile for Sphinx documentation
# You can set these variables from the command line.
SPHINXOPTS = -j auto
SPHINXBUILD = sphinx-build
SPHINXAUTOGEN = sphinx-autogen
BUILDDIR = _build
# Internal variables.
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .
.PHONY: help all api html server clean
help:
@echo "Please use 'make <target>' where <target> is one of"
@echo " all build the HTML files from the existing rst sources"
@echo " api generate rst source files of API documentation"
@echo " html build the HTML files from the existing rst sources"
@echo " server make a local HTTP server for previewing the built documentation"
@echo " clean clean up built and generated files"
all: html
api:
@echo
@echo "Generating rst source files of API documentation."
@echo
$(SPHINXAUTOGEN) -i -t _templates -o api/generated api/*.rst
html: api
@echo
@echo "Building HTML files."
@echo
# Set PYGMT_USE_EXTERNAL_DISPLAY to "false" to disable external display
PYGMT_USE_EXTERNAL_DISPLAY="false" $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
server:
@echo
@echo "Running a server on port 8009."
@echo "Open http://localhost:8009 in a web browser to preview the documentation."
@echo
cd $(BUILDDIR)/html && python -m http.server 8009
clean:
rm -rf $(BUILDDIR)
rm -rf api/generated
rm -rf gallery
rm -rf tutorials
rm -rf projections