Improve the targets in doc/Makefile
Remove useless "linkcheck" and "doctest" targets
Improve the "clean" target
Improve the verbose messages of "api" and "server" targets
Rename the "serve" target to "server"
@@ -9,27 +9,23 @@ BUILDDIR = _build
# Internal variables.
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .
-.PHONY: help clean html linkcheck doctest api
-
-all: html
+.PHONY: help all api html server clean
help:
- @echo "Please use \`make <target>' where <target> is one of"
- @echo " all generate the complete webpage"
- @echo " html make only the HTML files from the existing rst sources"
- @echo " linkcheck check all external links for integrity"
- @echo " doctest run all doctests embedded in the documentation (if enabled)"
+ @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"
-clean:
- rm -rf $(BUILDDIR)/html
- rm -rf $(BUILDDIR)/doctrees
- rm -rf $(BUILDDIR)/linkcheck
- rm -rf modules
- rm -rf api/generated
- rm -rf gallery
- rm -rf tutorials
- rm -rf projections
- rm -rf .ipynb_checkpoints
+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
@@ -39,23 +35,16 @@ html: api
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-api:
+server:
@echo
- @echo "Building API docs."
+ @echo "Running a server on port 8009."
+ @echo "Open http://localhost:8009 in a web browser to preview the documentation."
@echo
- $(SPHINXAUTOGEN) -i -t _templates -o api/generated api/*.rst
-
-
-linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
-
-serve:
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
