Debian Codegraph @

docs/make.bat

raw
1 @ECHO OFF
2
3 REM Command file for Sphinx documentation
4
5 pushd %~dp0
6
7 if "%SPHINXBUILD%" == "" (
8 set SPHINXBUILD=python -msphinx
9 )
10 set BUILDDIR=_build
11 set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
12 set I18NSPHINXOPTS=%SPHINXOPTS% .
13 if NOT "%PAPER%" == "" (
14 set ALLSPHINXOPTS=-D latex_elements.papersize=%PAPER% %ALLSPHINXOPTS%
15 set I18NSPHINXOPTS=-D latex_elements.papersize=%PAPER% %I18NSPHINXOPTS%
16 )
17
18 if "%1" == "" goto help
19
20 if "%1" == "help" (
21 :help
22 echo.Please use `make ^<target^>` where ^<target^> is one of
23 echo. html to make standalone HTML files
24 echo. dirhtml to make HTML files named index.html in directories
25 echo. singlehtml to make a single large HTML file
26 echo. pickle to make pickle files
27 echo. json to make JSON files
28 echo. htmlhelp to make HTML files and an HTML help project
29 echo. qthelp to make HTML files and a qthelp project
30 echo. devhelp to make HTML files and a Devhelp project
31 echo. epub to make an epub
32 echo. epub3 to make an epub3
33 echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
34 echo. text to make text files
35 echo. man to make manual pages
36 echo. texinfo to make Texinfo files
37 echo. gettext to make PO message catalogs
38 echo. changes to make an overview over all changed/added/deprecated items
39 echo. xml to make Docutils-native XML files
40 echo. pseudoxml to make pseudoxml-XML files for display purposes
41 echo. linkcheck to check all external links for integrity
42 echo. doctest to run all doctests embedded in the documentation if enabled
43 echo. coverage to run coverage check of the documentation if enabled
44 echo. dummy to check syntax errors of document sources
45 goto end
46 )
47
48 if "%1" == "clean" (
49 for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
50 del /q /s %BUILDDIR%\*
51 goto end
52 )
53
54
55 REM Check if sphinx-build is available
56 %SPHINXBUILD% 1>NUL 2>NUL
57 if errorlevel 1 (
58 echo.
59 echo.The Sphinx module was not found. Make sure you have Sphinx installed,
60 echo.then set the SPHINXBUILD environment variable to point to the full
61 echo.path of the 'sphinx-build' executable. Alternatively you may add the
62 echo.Sphinx directory to PATH.
63 echo.
64 echo.If you don't have Sphinx installed, grab it from
65 echo.http://sphinx-doc.org/
66 exit /b 1
67 )
68
69
70 if "%1" == "html" (
71 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
72 if errorlevel 1 exit /b 1
73 echo.
74 echo.Build finished. The HTML pages are in %BUILDDIR%/html.
75 goto end
76 )
77
78 if "%1" == "dirhtml" (
79 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
80 if errorlevel 1 exit /b 1
81 echo.
82 echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
83 goto end
84 )
85
86 if "%1" == "singlehtml" (
87 %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
88 if errorlevel 1 exit /b 1
89 echo.
90 echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
91 goto end
92 )
93
94 if "%1" == "pickle" (
95 %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
96 if errorlevel 1 exit /b 1
97 echo.
98 echo.Build finished; now you can process the pickle files.
99 goto end
100 )
101
102 if "%1" == "json" (
103 %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
104 if errorlevel 1 exit /b 1
105 echo.
106 echo.Build finished; now you can process the JSON files.
107 goto end
108 )
109
110 if "%1" == "htmlhelp" (
111 %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
112 if errorlevel 1 exit /b 1
113 echo.
114 echo.Build finished; now you can run HTML Help Workshop with the ^
115 .hhp project file in %BUILDDIR%/htmlhelp.
116 goto end
117 )
118
119 if "%1" == "qthelp" (
120 %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
121 if errorlevel 1 exit /b 1
122 echo.
123 echo.Build finished; now you can run "qcollectiongenerator" with the ^
124 .qhcp project file in %BUILDDIR%/qthelp, like this:
125 echo.^> qcollectiongenerator %BUILDDIR%\qthelp\aws_xray_sdk.qhcp
126 echo.To view the help file:
127 echo.^> assistant -collectionFile %BUILDDIR%\qthelp\aws_xray_sdk.ghc
128 goto end
129 )
130
131 if "%1" == "devhelp" (
132 %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
133 if errorlevel 1 exit /b 1
134 echo.
135 echo.Build finished.
136 goto end
137 )
138
139 if "%1" == "epub" (
140 %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
141 if errorlevel 1 exit /b 1
142 echo.
143 echo.Build finished. The epub file is in %BUILDDIR%/epub.
144 goto end
145 )
146
147 if "%1" == "epub3" (
148 %SPHINXBUILD% -b epub3 %ALLSPHINXOPTS% %BUILDDIR%/epub3
149 if errorlevel 1 exit /b 1
150 echo.
151 echo.Build finished. The epub3 file is in %BUILDDIR%/epub3.
152 goto end
153 )
154
155 if "%1" == "latex" (
156 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
157 if errorlevel 1 exit /b 1
158 echo.
159 echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
160 goto end
161 )
162
163 if "%1" == "latexpdf" (
164 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
165 cd %BUILDDIR%/latex
166 make all-pdf
167 cd %~dp0
168 echo.
169 echo.Build finished; the PDF files are in %BUILDDIR%/latex.
170 goto end
171 )
172
173 if "%1" == "latexpdfja" (
174 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
175 cd %BUILDDIR%/latex
176 make all-pdf-ja
177 cd %~dp0
178 echo.
179 echo.Build finished; the PDF files are in %BUILDDIR%/latex.
180 goto end
181 )
182
183 if "%1" == "text" (
184 %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
185 if errorlevel 1 exit /b 1
186 echo.
187 echo.Build finished. The text files are in %BUILDDIR%/text.
188 goto end
189 )
190
191 if "%1" == "man" (
192 %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
193 if errorlevel 1 exit /b 1
194 echo.
195 echo.Build finished. The manual pages are in %BUILDDIR%/man.
196 goto end
197 )
198
199 if "%1" == "texinfo" (
200 %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
201 if errorlevel 1 exit /b 1
202 echo.
203 echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
204 goto end
205 )
206
207 if "%1" == "gettext" (
208 %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
209 if errorlevel 1 exit /b 1
210 echo.
211 echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
212 goto end
213 )
214
215 if "%1" == "changes" (
216 %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
217 if errorlevel 1 exit /b 1
218 echo.
219 echo.The overview file is in %BUILDDIR%/changes.
220 goto end
221 )
222
223 if "%1" == "linkcheck" (
224 %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
225 if errorlevel 1 exit /b 1
226 echo.
227 echo.Link check complete; look for any errors in the above output ^
228 or in %BUILDDIR%/linkcheck/output.txt.
229 goto end
230 )
231
232 if "%1" == "doctest" (
233 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
234 if errorlevel 1 exit /b 1
235 echo.
236 echo.Testing of doctests in the sources finished, look at the ^
237 results in %BUILDDIR%/doctest/output.txt.
238 goto end
239 )
240
241 if "%1" == "coverage" (
242 %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
243 if errorlevel 1 exit /b 1
244 echo.
245 echo.Testing of coverage in the sources finished, look at the ^
246 results in %BUILDDIR%/coverage/python.txt.
247 goto end
248 )
249
250 if "%1" == "xml" (
251 %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
252 if errorlevel 1 exit /b 1
253 echo.
254 echo.Build finished. The XML files are in %BUILDDIR%/xml.
255 goto end
256 )
257
258 if "%1" == "pseudoxml" (
259 %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
260 if errorlevel 1 exit /b 1
261 echo.
262 echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
263 goto end
264 )
265
266 if "%1" == "dummy" (
267 %SPHINXBUILD% -b dummy %ALLSPHINXOPTS% %BUILDDIR%/dummy
268 if errorlevel 1 exit /b 1
269 echo.
270 echo.Build finished. Dummy builder generates no files.
271 goto end
272 )
273
274 :end
275 popd