@@ -7,29 +7,25 @@ SPHINXAUTOGEN = sphinx-autogen
7
7
BUILDDIR = _build
8
8
9
9
# Internal variables.
10
- ALLSPHINXOPTS = -d $(BUILDDIR ) /doctrees $(SPHINXOPTS ) .
10
+ ALLSPHINXOPTS = -d $(BUILDDIR ) /doctrees $(SPHINXOPTS ) .
11
11
12
- .PHONY : help clean html linkcheck doctest api
13
-
14
- all : html
12
+ .PHONY : help all api html server clean
15
13
16
14
help :
17
- @echo " Please use \` make <target>' where <target> is one of"
18
- @echo " all generate the complete webpage"
19
- @echo " html make only the HTML files from the existing rst sources"
20
- @echo " linkcheck check all external links for integrity"
21
- @echo " doctest run all doctests embedded in the documentation (if enabled)"
15
+ @echo " Please use 'make <target>' where <target> is one of"
16
+ @echo " all build the HTML files from the existing rst sources"
17
+ @echo " api generate rst source files of API documentation"
18
+ @echo " html build the HTML files from the existing rst sources"
19
+ @echo " server make a local HTTP server for previewing the built documentation"
20
+ @echo " clean clean up built and generated files"
22
21
23
- clean :
24
- rm -rf $(BUILDDIR ) /html
25
- rm -rf $(BUILDDIR ) /doctrees
26
- rm -rf $(BUILDDIR ) /linkcheck
27
- rm -rf modules
28
- rm -rf api/generated
29
- rm -rf gallery
30
- rm -rf tutorials
31
- rm -rf projections
32
- rm -rf .ipynb_checkpoints
22
+ all : html
23
+
24
+ api :
25
+ @echo
26
+ @echo " Generating rst source files of API documentation."
27
+ @echo
28
+ $(SPHINXAUTOGEN ) -i -t _templates -o api/generated api/* .rst
33
29
34
30
html : api
35
31
@echo
@@ -39,23 +35,16 @@ html: api
39
35
@echo
40
36
@echo " Build finished. The HTML pages are in $( BUILDDIR) /html."
41
37
42
- api :
38
+ server :
43
39
@echo
44
- @echo " Building API docs."
40
+ @echo " Running a server on port 8009."
41
+ @echo " Open http://localhost:8009 in a web browser to preview the documentation."
45
42
@echo
46
- $(SPHINXAUTOGEN ) -i -t _templates -o api/generated api/* .rst
47
-
48
-
49
- linkcheck :
50
- $(SPHINXBUILD ) -b linkcheck $(ALLSPHINXOPTS ) $(BUILDDIR ) /linkcheck
51
- @echo
52
- @echo " Link check complete; look for any errors in the above output " \
53
- " or in $( BUILDDIR) /linkcheck/output.txt."
54
-
55
- doctest :
56
- $(SPHINXBUILD ) -b doctest $(ALLSPHINXOPTS ) $(BUILDDIR ) /doctest
57
- @echo " Testing of doctests in the sources finished, look at the " \
58
- " results in $( BUILDDIR) /doctest/output.txt."
59
-
60
- serve :
61
43
cd $(BUILDDIR ) /html && python -m http.server 8009
44
+
45
+ clean :
46
+ rm -rf $(BUILDDIR )
47
+ rm -rf api/generated
48
+ rm -rf gallery
49
+ rm -rf tutorials
50
+ rm -rf projections
0 commit comments