3 REM Command file for Sphinx documentation
5 if "%SPHINXBUILD%" == "" (
6 set SPHINXBUILD
=sphinx
-build
9 set ALLSPHINXOPTS
=-d
%BUILDDIR%/doctrees
%SPHINXOPTS% .
10 set I18NSPHINXOPTS
=%SPHINXOPTS% .
11 if NOT "%PAPER%" == "" (
12 set ALLSPHINXOPTS
=-D latex_paper_size
=%PAPER% %ALLSPHINXOPTS%
13 set I18NSPHINXOPTS
=-D latex_paper_size
=%PAPER% %I18NSPHINXOPTS%
16 if "%1" == "" goto help
20 echo.Please
use `make ^
<target^
>` where ^
<target^
> is one of
21 echo. html to make standalone HTML
files
22 echo. dirhtml to make HTML
files named index.html in directories
23 echo. singlehtml to make a single large HTML file
24 echo. pickle to make pickle
files
25 echo. json to make JSON
files
26 echo. htmlhelp to make HTML
files and a HTML help project
27 echo. qthelp to make HTML
files and a qthelp project
28 echo. devhelp to make HTML
files and a Devhelp project
29 echo. epub to make an epub
30 echo. epub3 to make an epub3
31 echo. latex to make LaTeX
files, you can
set PAPER
=a4 or PAPER
=letter
32 echo. text to make text
files
33 echo. man to make manual pages
34 echo. texinfo to make Texinfo
files
35 echo. gettext to make PO message catalogs
36 echo. changes to make an overview over all changed
/added
/deprecated items
37 echo. xml to make Docutils
-native XML
files
38 echo. pseudoxml to make pseudoxml
-XML
files for display purposes
39 echo. linkcheck to check all external links
for integrity
40 echo. doctest to
run all doctests embedded in the documentation
if enabled
41 echo. coverage to
run coverage check of the documentation
if enabled
42 echo. dummy to check syntax errors of document sources
47 for /d
%%i in
(%BUILDDIR%\
*) do rmdir /q
/s
%%i
48 del /q
/s
%BUILDDIR%\
*
53 REM Check if sphinx-build is available and fallback to Python version if any
54 %SPHINXBUILD% 1>NUL
2>NUL
55 if errorlevel 9009 goto sphinx_python
60 set SPHINXBUILD
=python
-m sphinx.__init__
64 echo.The
'sphinx-build' command was
not found. Make sure you have Sphinx
65 echo.installed
, then set the SPHINXBUILD environment variable to point
66 echo.to the full
path of the
'sphinx-build' executable. Alternatively you
67 echo.may add the Sphinx directory to
PATH.
69 echo.
If you don
't have Sphinx installed, grab it from
70 echo.http://sphinx-doc.org/
78 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
79 if errorlevel 1 exit /b 1
81 echo.Build finished. The HTML pages are in %BUILDDIR%/html.
85 if "%1" == "dirhtml" (
86 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
87 if errorlevel 1 exit /b 1
89 echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
93 if "%1" == "singlehtml" (
94 %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
95 if errorlevel 1 exit /b 1
97 echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
101 if "%1" == "pickle" (
102 %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
103 if errorlevel 1 exit /b 1
105 echo.Build finished; now you can process the pickle files.
110 %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
111 if errorlevel 1 exit /b 1
113 echo.Build finished; now you can process the JSON files.
117 if "%1" == "htmlhelp" (
118 %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
119 if errorlevel 1 exit /b 1
121 echo.Build finished; now you can run HTML Help Workshop with the ^
122 .hhp project file in %BUILDDIR%/htmlhelp.
126 if "%1" == "qthelp" (
127 %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
128 if errorlevel 1 exit /b 1
130 echo.Build finished; now you can run "qcollectiongenerator" with the ^
131 .qhcp project file in %BUILDDIR%/qthelp, like this:
132 echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Charybdisoperatorguide.qhcp
133 echo.To view the help file:
134 echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Charybdisoperatorguide.ghc
138 if "%1" == "devhelp" (
139 %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
140 if errorlevel 1 exit /b 1
147 %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
148 if errorlevel 1 exit /b 1
150 echo.Build finished. The epub file is in %BUILDDIR%/epub.
155 %SPHINXBUILD% -b epub3 %ALLSPHINXOPTS% %BUILDDIR%/epub3
156 if errorlevel 1 exit /b 1
158 echo.Build finished. The epub3 file is in %BUILDDIR%/epub3.
163 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
164 if errorlevel 1 exit /b 1
166 echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
170 if "%1" == "latexpdf" (
171 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
176 echo.Build finished; the PDF files are in %BUILDDIR%/latex.
180 if "%1" == "latexpdfja" (
181 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
186 echo.Build finished; the PDF files are in %BUILDDIR%/latex.
191 %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
192 if errorlevel 1 exit /b 1
194 echo.Build finished. The text files are in %BUILDDIR%/text.
199 %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
200 if errorlevel 1 exit /b 1
202 echo.Build finished. The manual pages are in %BUILDDIR%/man.
206 if "%1" == "texinfo" (
207 %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
208 if errorlevel 1 exit /b 1
210 echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
214 if "%1" == "gettext" (
215 %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
216 if errorlevel 1 exit /b 1
218 echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
222 if "%1" == "changes" (
223 %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
224 if errorlevel 1 exit /b 1
226 echo.The overview file is in %BUILDDIR%/changes.
230 if "%1" == "linkcheck" (
231 %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
232 if errorlevel 1 exit /b 1
234 echo.Link check complete; look for any errors in the above output ^
235 or in %BUILDDIR%/linkcheck/output.txt.
239 if "%1" == "doctest" (
240 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
241 if errorlevel 1 exit /b 1
243 echo.Testing of doctests in the sources finished, look at the ^
244 results in %BUILDDIR%/doctest/output.txt.
248 if "%1" == "coverage" (
249 %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
250 if errorlevel 1 exit /b 1
252 echo.Testing of coverage in the sources finished, look at the ^
253 results in %BUILDDIR%/coverage/python.txt.
258 %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
259 if errorlevel 1 exit /b 1
261 echo.Build finished. The XML files are in %BUILDDIR%/xml.
265 if "%1" == "pseudoxml" (
266 %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
267 if errorlevel 1 exit /b 1
269 echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
274 %SPHINXBUILD% -b dummy %ALLSPHINXOPTS% %BUILDDIR%/dummy
275 if errorlevel 1 exit /b 1
277 echo.Build finished. Dummy builder generates no files.