Debian Codegraph @

docs/Makefile

raw symbols SCIP
1 # Makefile for Sphinx documentation
2 #
3
4 # You can set these variables from the command line.
5 SPHINXOPTS =
6 SPHINXBUILD = venv/bin/sphinx-build
7 SPHINXAUTOBUILD = venv/bin/sphinx-autobuild
8 PAPER =
9 BUILDDIR = _build
10 LOCALESDIR = _locales
11
12 # Internal variables.
13 PAPEROPT_a4 = -D latex_paper_size=a4
14 PAPEROPT_letter = -D latex_paper_size=letter
15 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
16 # the i18n builder cannot share the environment and doctrees with the others
17 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
18
19 .PHONY: help cleanhtml clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext livehtml rtd-pr-preview
20
21 venv:
22 pwd
23 git fetch --tags
24 python -m venv venv
25 venv/bin/pip install -r requirements.txt
26
27 help:
28 @echo "Please use \`make <target>' where <target> is one of"
29 @echo " html to make standalone HTML files"
30 @echo " livehtml to view a live preview of standalone HTML files"
31 @echo " dirhtml to make HTML files named index.html in directories"
32 @echo " singlehtml to make a single large HTML file"
33 @echo " pickle to make pickle files"
34 @echo " json to make JSON files"
35 @echo " htmlhelp to make HTML files and a HTML help project"
36 @echo " qthelp to make HTML files and a qthelp project"
37 @echo " devhelp to make HTML files and a Devhelp project"
38 @echo " epub to make an epub"
39 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
40 @echo " latexpdf to make LaTeX files and run them through pdflatex"
41 @echo " text to make text files"
42 @echo " man to make manual pages"
43 @echo " texinfo to make Texinfo files"
44 @echo " info to make Texinfo files and run them through makeinfo"
45 @echo " gettext to make PO message catalogs"
46 @echo " changes to make an overview of all changed/added/deprecated items"
47 @echo " linkcheck to check all external links for integrity"
48 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
49
50 cleanhtml:
51 -rm -rf $(BUILDDIR)/*
52
53 clean: cleanhtml
54 -rm -rf venv
55
56 html: venv
57 $(SPHINXBUILD) -b html --fresh-env --write-all $(ALLSPHINXOPTS) $(BUILDDIR)/html
58 @echo
59 @echo "Build finished. The HTML pages are in docs/$(BUILDDIR)/html."
60 rm -rf build
61
62 latexpdf: venv
63 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
64 @echo "Running LaTeX files through pdflatex..."
65 $(MAKE) -C $(BUILDDIR)/latex all-pdf
66 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
67
68 text: venv
69 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
70 @echo
71 @echo "Build finished. The text files are in $(BUILDDIR)/text."
72
73 man: venv
74 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
75 @echo
76 @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
77
78 gettext: venv
79 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(LOCALESDIR)
80 @echo
81 @echo "Build finished. The message catalogs are in $(LOCALESDIR)."
82
83 linkcheck: venv
84 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
85 @echo
86 @echo "Link check complete; look for any errors in the above output " \
87 "or in $(BUILDDIR)/linkcheck/output.txt."
88
89 doctest: venv
90 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
91 @echo "Testing of doctests in the sources finished, look at the " \
92 "results in $(BUILDDIR)/doctest/output.txt."
93
94 livehtml: venv
95 # rebuild because the modules change
96 $(SPHINXAUTOBUILD) \
97 --watch .. \
98 --port 8050 \
99 -b html . "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)
100
101 rtd-pr-preview: venv ## Build pull request preview on Read the Docs
102 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ${READTHEDOCS_OUTPUT}/html/