Debian Codegraph @

docs/Makefile

raw
1 # This file is part of the django-environ.
2 #
3 # Copyright (c) 2021-2024, Serghei Iakovlev <[email protected]>
4 # Copyright (c) 2013-2021, Daniele Faraglia <[email protected]>
5 #
6 # For the full copyright and license information, please view
7 # the LICENSE.txt file that was distributed with this source code.
8
9 # Makefile for Sphinx documentation
10
11 # You can set these variables from the command line.
12 SPHINXOPTS =
13 SPHINXBUILD = sphinx-build
14 PAPER =
15 BUILDDIR = _build
16
17 # User-friendly check for sphinx-build
18 ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
19 $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
20 endif
21
22 # Internal variables.
23 PAPEROPT_a4 = -D latex_paper_size=a4
24 PAPEROPT_letter = -D latex_paper_size=letter
25 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
26 # the i18n builder cannot share the environment and doctrees with the others
27 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
28
29 .PHONY: help
30 help:
31 @echo "Please use \`make <target>' where <target> is one of"
32 @echo " html to make standalone HTML files"
33 @echo " dirhtml to make HTML files named index.html in directories"
34 @echo " singlehtml to make a single large HTML file"
35 @echo " pickle to make pickle files"
36 @echo " json to make JSON files"
37 @echo " htmlhelp to make HTML files and a HTML help project"
38 @echo " qthelp to make HTML files and a qthelp project"
39 @echo " devhelp to make HTML files and a Devhelp project"
40 @echo " epub to make an epub"
41 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
42 @echo " latexpdf to make LaTeX files and run them through pdflatex"
43 @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
44 @echo " text to make text files"
45 @echo " man to make manual pages"
46 @echo " texinfo to make Texinfo files"
47 @echo " info to make Texinfo files and run them through makeinfo"
48 @echo " gettext to make PO message catalogs"
49 @echo " changes to make an overview of all changed/added/deprecated items"
50 @echo " xml to make Docutils-native XML files"
51 @echo " pseudoxml to make pseudoxml-XML files for display purposes"
52 @echo " linkcheck to check all external links for integrity"
53 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
54
55 .PHONY: clean
56 clean:
57 rm -rf $(BUILDDIR)/*
58
59 .PHONY: html
60 html:
61 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
62 @echo
63 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
64
65 .PHONY: dirhtml
66 dirhtml:
67 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
68 @echo
69 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
70
71 .PHONY: singlehtml
72 singlehtml:
73 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
74 @echo
75 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
76
77 .PHONY: pickle
78 pickle:
79 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
80 @echo
81 @echo "Build finished; now you can process the pickle files."
82
83 .PHONY: json
84 json:
85 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
86 @echo
87 @echo "Build finished; now you can process the JSON files."
88
89 .PHONY: htmlhelp
90 htmlhelp:
91 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
92 @echo
93 @echo "Build finished; now you can run HTML Help Workshop with the" \
94 ".hhp project file in $(BUILDDIR)/htmlhelp."
95
96 .PHONY: qthelp
97 qthelp:
98 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
99 @echo
100 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
101 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
102 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/django-environ.qhcp"
103 @echo "To view the help file:"
104 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/django-environ.qhc"
105
106 .PHONY: devhelp
107 devhelp:
108 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
109 @echo
110 @echo "Build finished."
111 @echo "To view the help file:"
112 @echo "# mkdir -p $$HOME/.local/share/devhelp/django-environ"
113 @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/django-environ"
114 @echo "# devhelp"
115
116 .PHONY: epub
117 epub:
118 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
119 @echo
120 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
121
122 .PHONY: latex
123 latex:
124 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
125 @echo
126 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
127 @echo "Run \`make' in that directory to run these through (pdf)latex" \
128 "(use \`make latexpdf' here to do that automatically)."
129
130 .PHONY: latexpdf
131 latexpdf:
132 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
133 @echo "Running LaTeX files through pdflatex..."
134 $(MAKE) -C $(BUILDDIR)/latex all-pdf
135 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
136
137 .PHONY:
138 latexpdfja:
139 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
140 @echo "Running LaTeX files through platex and dvipdfmx..."
141 $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
142 @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
143
144 .PHONY: text
145 text:
146 $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
147 @echo
148 @echo "Build finished. The text files are in $(BUILDDIR)/text."
149
150 .PHONY: man
151 man:
152 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
153 @echo
154 @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
155
156 .PHONY: texinfo
157 texinfo:
158 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
159 @echo
160 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
161 @echo "Run \`make' in that directory to run these through makeinfo" \
162 "(use \`make info' here to do that automatically)."
163
164 .PHONY: info
165 info:
166 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
167 @echo "Running Texinfo files through makeinfo..."
168 make -C $(BUILDDIR)/texinfo info
169 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
170
171 .PHONY: gettext
172 gettext:
173 $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
174 @echo
175 @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
176
177 .PHONY: changes
178 changes:
179 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
180 @echo
181 @echo "The overview file is in $(BUILDDIR)/changes."
182
183 .PHONY: linkcheck
184 linkcheck:
185 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
186 @echo
187 @echo "Link check complete; look for any errors in the above output " \
188 "or in $(BUILDDIR)/linkcheck/output.txt."
189
190 .PHONY: doctest
191 doctest:
192 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
193 @echo "Testing of doctests in the sources finished, look at the " \
194 "results in $(BUILDDIR)/doctest/output.txt."
195
196 .PHONY: xml
197 xml:
198 $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
199 @echo
200 @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
201
202 .PHONY: pseudoxml
203 pseudoxml:
204 $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
205 @echo
206 @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."