@@ -7,8 +7,10 @@ if "%SPHINXBUILD%" == "" (
77)
88set BUILDDIR = _build
99set ALLSPHINXOPTS = -d %BUILDDIR% /doctrees %SPHINXOPTS% .
10+ set I18NSPHINXOPTS = %SPHINXOPTS% .
1011if NOT " %PAPER% " == " " (
1112 set ALLSPHINXOPTS = -D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
13+ set I18NSPHINXOPTS = -D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
1214)
1315
1416if " %1 " == " " goto help
@@ -28,7 +30,11 @@ if "%1" == "help" (
2830 echo . latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
2931 echo . text to make text files
3032 echo . man to make manual pages
33+ echo . texinfo to make Texinfo files
34+ echo . gettext to make PO message catalogs
3135 echo . changes to make an overview over all changed/added/deprecated items
36+ echo . xml to make Docutils-native XML files
37+ echo . pseudoxml to make pseudoxml-XML files for display purposes
3238 echo . linkcheck to check all external links for integrity
3339 echo . doctest to run all doctests embedded in the documentation if enabled
3440 goto end
@@ -40,43 +46,63 @@ if "%1" == "clean" (
4046 goto end
4147)
4248
49+
50+ %SPHINXBUILD% 2 > nul
51+ if errorlevel 9009 (
52+ echo .
53+ echo .The 'sphinx-build' command was not found. Make sure you have Sphinx
54+ echo .installed, then set the SPHINXBUILD environment variable to point
55+ echo .to the full path of the 'sphinx-build' executable. Alternatively you
56+ echo .may add the Sphinx directory to PATH.
57+ echo .
58+ echo .If you don't have Sphinx installed, grab it from
59+ echo .http://sphinx-doc.org/
60+ exit /b 1
61+ )
62+
4363if " %1 " == " html" (
4464 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR% /html
65+ if errorlevel 1 exit /b 1
4566 echo .
4667 echo .Build finished. The HTML pages are in %BUILDDIR% /html.
4768 goto end
4869)
4970
5071if " %1 " == " dirhtml" (
5172 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR% /dirhtml
73+ if errorlevel 1 exit /b 1
5274 echo .
5375 echo .Build finished. The HTML pages are in %BUILDDIR% /dirhtml.
5476 goto end
5577)
5678
5779if " %1 " == " singlehtml" (
5880 %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR% /singlehtml
81+ if errorlevel 1 exit /b 1
5982 echo .
6083 echo .Build finished. The HTML pages are in %BUILDDIR% /singlehtml.
6184 goto end
6285)
6386
6487if " %1 " == " pickle" (
6588 %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR% /pickle
89+ if errorlevel 1 exit /b 1
6690 echo .
6791 echo .Build finished; now you can process the pickle files.
6892 goto end
6993)
7094
7195if " %1 " == " json" (
7296 %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR% /json
97+ if errorlevel 1 exit /b 1
7398 echo .
7499 echo .Build finished; now you can process the JSON files.
75100 goto end
76101)
77102
78103if " %1 " == " htmlhelp" (
79104 %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR% /htmlhelp
105+ if errorlevel 1 exit /b 1
80106 echo .
81107 echo .Build finished; now you can run HTML Help Workshop with the ^
82108.hhp project file in %BUILDDIR% /htmlhelp.
@@ -85,6 +111,7 @@ if "%1" == "htmlhelp" (
85111
86112if " %1 " == " qthelp" (
87113 %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR% /qthelp
114+ if errorlevel 1 exit /b 1
88115 echo .
89116 echo .Build finished; now you can run " qcollectiongenerator" with the ^
90117.qhcp project file in %BUILDDIR% /qthelp, like this:
@@ -96,48 +123,91 @@ if "%1" == "qthelp" (
96123
97124if " %1 " == " devhelp" (
98125 %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR% /devhelp
126+ if errorlevel 1 exit /b 1
99127 echo .
100128 echo .Build finished.
101129 goto end
102130)
103131
104132if " %1 " == " epub" (
105133 %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR% /epub
134+ if errorlevel 1 exit /b 1
106135 echo .
107136 echo .Build finished. The epub file is in %BUILDDIR% /epub.
108137 goto end
109138)
110139
111140if " %1 " == " latex" (
112141 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR% /latex
142+ if errorlevel 1 exit /b 1
113143 echo .
114144 echo .Build finished; the LaTeX files are in %BUILDDIR% /latex.
115145 goto end
116146)
117147
148+ if " %1 " == " latexpdf" (
149+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR% /latex
150+ cd %BUILDDIR% /latex
151+ make all-pdf
152+ cd %BUILDDIR% /..
153+ echo .
154+ echo .Build finished; the PDF files are in %BUILDDIR% /latex.
155+ goto end
156+ )
157+
158+ if " %1 " == " latexpdfja" (
159+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR% /latex
160+ cd %BUILDDIR% /latex
161+ make all-pdf-ja
162+ cd %BUILDDIR% /..
163+ echo .
164+ echo .Build finished; the PDF files are in %BUILDDIR% /latex.
165+ goto end
166+ )
167+
118168if " %1 " == " text" (
119169 %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR% /text
170+ if errorlevel 1 exit /b 1
120171 echo .
121172 echo .Build finished. The text files are in %BUILDDIR% /text.
122173 goto end
123174)
124175
125176if " %1 " == " man" (
126177 %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR% /man
178+ if errorlevel 1 exit /b 1
127179 echo .
128180 echo .Build finished. The manual pages are in %BUILDDIR% /man.
129181 goto end
130182)
131183
184+ if " %1 " == " texinfo" (
185+ %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR% /texinfo
186+ if errorlevel 1 exit /b 1
187+ echo .
188+ echo .Build finished. The Texinfo files are in %BUILDDIR% /texinfo.
189+ goto end
190+ )
191+
192+ if " %1 " == " gettext" (
193+ %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR% /locale
194+ if errorlevel 1 exit /b 1
195+ echo .
196+ echo .Build finished. The message catalogs are in %BUILDDIR% /locale.
197+ goto end
198+ )
199+
132200if " %1 " == " changes" (
133201 %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR% /changes
202+ if errorlevel 1 exit /b 1
134203 echo .
135204 echo .The overview file is in %BUILDDIR% /changes.
136205 goto end
137206)
138207
139208if " %1 " == " linkcheck" (
140209 %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR% /linkcheck
210+ if errorlevel 1 exit /b 1
141211 echo .
142212 echo .Link check complete; look for any errors in the above output ^
143213or in %BUILDDIR% /linkcheck/output.txt.
@@ -146,10 +216,27 @@ or in %BUILDDIR%/linkcheck/output.txt.
146216
147217if " %1 " == " doctest" (
148218 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR% /doctest
219+ if errorlevel 1 exit /b 1
149220 echo .
150221 echo .Testing of doctests in the sources finished, look at the ^
151222results in %BUILDDIR% /doctest/output.txt.
152223 goto end
153224)
154225
226+ if " %1 " == " xml" (
227+ %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR% /xml
228+ if errorlevel 1 exit /b 1
229+ echo .
230+ echo .Build finished. The XML files are in %BUILDDIR% /xml.
231+ goto end
232+ )
233+
234+ if " %1 " == " pseudoxml" (
235+ %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR% /pseudoxml
236+ if errorlevel 1 exit /b 1
237+ echo .
238+ echo .Build finished. The pseudo-XML files are in %BUILDDIR% /pseudoxml.
239+ goto end
240+ )
241+
155242:end
0 commit comments