matplotlib
50 строк · 1.8 Кб
1# Minimal makefile for Sphinx documentation
2#
3
4# You can set these variables from the command line.
5SPHINXOPTS = -W --keep-going
6SPHINXBUILD = python -msphinx
7SPHINXPROJ = matplotlib
8SOURCEDIR = .
9BUILDDIR = build
10
11# Put it first so that "make" without argument is like "make help".
12help:
13@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
15.PHONY: help Makefile
16
17# workaround because sphinx does not completely clean up (#11139)
18clean:
19@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
20rm -rf "$(SOURCEDIR)/build"
21rm -rf "$(SOURCEDIR)/_tags"
22rm -rf "$(SOURCEDIR)/api/_as_gen"
23rm -rf "$(SOURCEDIR)/gallery"
24rm -rf "$(SOURCEDIR)/plot_types"
25rm -rf "$(SOURCEDIR)/tutorials"
26rm -rf "$(SOURCEDIR)/users/explain"
27rm -rf "$(SOURCEDIR)/savefig"
28rm -rf "$(SOURCEDIR)/sphinxext/__pycache__"
29rm -f $(SOURCEDIR)/_static/constrained_layout*.png
30rm -f $(SOURCEDIR)/sg_execution_times.rst
31
32show:
33@python -c "import webbrowser; webbrowser.open_new_tab('file://$(shell pwd)/build/html/index.html')"
34
35html-noplot:
36$(SPHINXBUILD) -D plot_gallery=0 -b html $(SOURCEDIR) $(BUILDDIR)/html $(SPHINXOPTS) $(O)
37@echo
38@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
39
40# This will skip the subdirectories listed in .mpl_skip_subdirs.yaml If
41# this file does not exist, one will be created for you. This option useful
42# to quickly build parts of the docs, but the resulting build will not
43# have all the crosslinks etc.
44html-skip-subdirs:
45$(SPHINXBUILD) -D skip_sub_dirs=1 -b html $(SOURCEDIR) $(BUILDDIR)/html $(SPHINXOPTS) $(O)
46
47# Catch-all target: route all unknown targets to Sphinx using the new
48# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
49%: Makefile
50@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
51