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. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
31 echo. text to make text files
32 echo. man to make manual pages
33 echo. texinfo to make Texinfo files
34 echo. gettext to make PO message catalogs
35 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
38 echo. linkcheck to check all external links for integrity
39 echo. doctest to run all doctests embedded in the documentation if enabled
40 echo. coverage to run coverage check of the documentation if enabled
45 for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
46 del /q /s %BUILDDIR%\*
51 REM Check if sphinx-build is available and fallback to Python version if any
53 if errorlevel 9009 goto sphinx_python
58 set SPHINXBUILD=python -m sphinx.__init__
62 echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
63 echo.installed, then set the SPHINXBUILD environment variable to point
64 echo.to the full path of the 'sphinx-build' executable. Alternatively you
65 echo.may add the Sphinx directory to PATH.
67 echo.If you don't have Sphinx installed, grab it from
68 echo.http://sphinx-doc.org/
76 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
77 if errorlevel 1 exit /b 1
79 echo.Build finished. The HTML pages are in %BUILDDIR%/html.
83 if "%1" == "dirhtml" (
84 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
85 if errorlevel 1 exit /b 1
87 echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
91 if "%1" == "singlehtml" (
92 %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
93 if errorlevel 1 exit /b 1
95 echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
100 %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
101 if errorlevel 1 exit /b 1
103 echo.Build finished; now you can process the pickle files.
108 %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
109 if errorlevel 1 exit /b 1
111 echo.Build finished; now you can process the JSON files.
115 if "%1" == "htmlhelp" (
116 %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
117 if errorlevel 1 exit /b 1
119 echo.Build finished; now you can run HTML Help Workshop with the ^
120 .hhp project file in %BUILDDIR%/htmlhelp.
124 if "%1" == "qthelp" (
125 %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
126 if errorlevel 1 exit /b 1
128 echo.Build finished; now you can run "qcollectiongenerator" with the ^
129 .qhcp project file in %BUILDDIR%/qthelp, like this:
130 echo.^> qcollectiongenerator %BUILDDIR%\qthelp\pyCraft.qhcp
131 echo.To view the help file:
132 echo.^> assistant -collectionFile %BUILDDIR%\qthelp\pyCraft.ghc
136 if "%1" == "devhelp" (
137 %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
138 if errorlevel 1 exit /b 1
145 %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
146 if errorlevel 1 exit /b 1
148 echo.Build finished. The epub file is in %BUILDDIR%/epub.
153 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
154 if errorlevel 1 exit /b 1
156 echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
160 if "%1" == "latexpdf" (
161 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
166 echo.Build finished; the PDF files are in %BUILDDIR%/latex.
170 if "%1" == "latexpdfja" (
171 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
176 echo.Build finished; the PDF files are in %BUILDDIR%/latex.
181 %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
182 if errorlevel 1 exit /b 1
184 echo.Build finished. The text files are in %BUILDDIR%/text.
189 %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
190 if errorlevel 1 exit /b 1
192 echo.Build finished. The manual pages are in %BUILDDIR%/man.
196 if "%1" == "texinfo" (
197 %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
198 if errorlevel 1 exit /b 1
200 echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
204 if "%1" == "gettext" (
205 %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
206 if errorlevel 1 exit /b 1
208 echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
212 if "%1" == "changes" (
213 %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
214 if errorlevel 1 exit /b 1
216 echo.The overview file is in %BUILDDIR%/changes.
220 if "%1" == "linkcheck" (
221 %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
222 if errorlevel 1 exit /b 1
224 echo.Link check complete; look for any errors in the above output ^
225 or in %BUILDDIR%/linkcheck/output.txt.
229 if "%1" == "doctest" (
230 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
231 if errorlevel 1 exit /b 1
233 echo.Testing of doctests in the sources finished, look at the ^
234 results in %BUILDDIR%/doctest/output.txt.
238 if "%1" == "coverage" (
239 %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
240 if errorlevel 1 exit /b 1
242 echo.Testing of coverage in the sources finished, look at the ^
243 results in %BUILDDIR%/coverage/python.txt.
248 %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
249 if errorlevel 1 exit /b 1
251 echo.Build finished. The XML files are in %BUILDDIR%/xml.
255 if "%1" == "pseudoxml" (
256 %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
257 if errorlevel 1 exit /b 1
259 echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.