3 REM Command file for Sphinx documentation
\r
5 if "%SPHINXBUILD%" == "" (
\r
6 set SPHINXBUILD=sphinx-build
\r
9 set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
\r
10 set I18NSPHINXOPTS=%SPHINXOPTS% .
\r
11 if NOT "%PAPER%" == "" (
\r
12 set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
\r
13 set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
\r
16 if "%1" == "" goto help
\r
20 echo.Please use `make ^<target^>` where ^<target^> is one of
\r
21 echo. html to make standalone HTML files
\r
22 echo. dirhtml to make HTML files named index.html in directories
\r
23 echo. singlehtml to make a single large HTML file
\r
24 echo. pickle to make pickle files
\r
25 echo. json to make JSON files
\r
26 echo. htmlhelp to make HTML files and a HTML help project
\r
27 echo. qthelp to make HTML files and a qthelp project
\r
28 echo. devhelp to make HTML files and a Devhelp project
\r
29 echo. epub to make an epub
\r
30 echo. epub3 to make an epub3
\r
31 echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
\r
32 echo. text to make text files
\r
33 echo. man to make manual pages
\r
34 echo. texinfo to make Texinfo files
\r
35 echo. gettext to make PO message catalogs
\r
36 echo. changes to make an overview over all changed/added/deprecated items
\r
37 echo. xml to make Docutils-native XML files
\r
38 echo. pseudoxml to make pseudoxml-XML files for display purposes
\r
39 echo. linkcheck to check all external links for integrity
\r
40 echo. doctest to run all doctests embedded in the documentation if enabled
\r
41 echo. coverage to run coverage check of the documentation if enabled
\r
45 if "%1" == "clean" (
\r
46 for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
\r
47 del /q /s %BUILDDIR%\*
\r
52 REM Check if sphinx-build is available and fallback to Python version if any
\r
53 %SPHINXBUILD% 1>NUL 2>NUL
\r
54 if errorlevel 9009 goto sphinx_python
\r
59 set SPHINXBUILD=python -m sphinx.__init__
\r
60 %SPHINXBUILD% 2> nul
\r
61 if errorlevel 9009 (
\r
63 echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
\r
64 echo.installed, then set the SPHINXBUILD environment variable to point
\r
65 echo.to the full path of the 'sphinx-build' executable. Alternatively you
\r
66 echo.may add the Sphinx directory to PATH.
\r
68 echo.If you don't have Sphinx installed, grab it from
\r
69 echo.http://sphinx-doc.org/
\r
77 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
\r
78 if errorlevel 1 exit /b 1
\r
80 echo.Build finished. The HTML pages are in %BUILDDIR%/html.
\r
84 if "%1" == "dirhtml" (
\r
85 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
\r
86 if errorlevel 1 exit /b 1
\r
88 echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
\r
92 if "%1" == "singlehtml" (
\r
93 %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
\r
94 if errorlevel 1 exit /b 1
\r
96 echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
\r
100 if "%1" == "pickle" (
\r
101 %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
\r
102 if errorlevel 1 exit /b 1
\r
104 echo.Build finished; now you can process the pickle files.
\r
108 if "%1" == "json" (
\r
109 %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
\r
110 if errorlevel 1 exit /b 1
\r
112 echo.Build finished; now you can process the JSON files.
\r
116 if "%1" == "htmlhelp" (
\r
117 %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
\r
118 if errorlevel 1 exit /b 1
\r
120 echo.Build finished; now you can run HTML Help Workshop with the ^
\r
121 .hhp project file in %BUILDDIR%/htmlhelp.
\r
125 if "%1" == "qthelp" (
\r
126 %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
\r
127 if errorlevel 1 exit /b 1
\r
129 echo.Build finished; now you can run "qcollectiongenerator" with the ^
\r
130 .qhcp project file in %BUILDDIR%/qthelp, like this:
\r
131 echo.^> qcollectiongenerator %BUILDDIR%\qthelp\OpenDaylightDocumentation.qhcp
\r
132 echo.To view the help file:
\r
133 echo.^> assistant -collectionFile %BUILDDIR%\qthelp\OpenDaylightDocumentation.ghc
\r
137 if "%1" == "devhelp" (
\r
138 %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
\r
139 if errorlevel 1 exit /b 1
\r
141 echo.Build finished.
\r
145 if "%1" == "epub" (
\r
146 %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
\r
147 if errorlevel 1 exit /b 1
\r
149 echo.Build finished. The epub file is in %BUILDDIR%/epub.
\r
153 if "%1" == "epub3" (
\r
154 %SPHINXBUILD% -b epub3 %ALLSPHINXOPTS% %BUILDDIR%/epub3
\r
155 if errorlevel 1 exit /b 1
\r
157 echo.Build finished. The epub3 file is in %BUILDDIR%/epub3.
\r
161 if "%1" == "latex" (
\r
162 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
\r
163 if errorlevel 1 exit /b 1
\r
165 echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
\r
169 if "%1" == "latexpdf" (
\r
170 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
\r
171 cd %BUILDDIR%/latex
\r
175 echo.Build finished; the PDF files are in %BUILDDIR%/latex.
\r
179 if "%1" == "latexpdfja" (
\r
180 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
\r
181 cd %BUILDDIR%/latex
\r
185 echo.Build finished; the PDF files are in %BUILDDIR%/latex.
\r
189 if "%1" == "text" (
\r
190 %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
\r
191 if errorlevel 1 exit /b 1
\r
193 echo.Build finished. The text files are in %BUILDDIR%/text.
\r
198 %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
\r
199 if errorlevel 1 exit /b 1
\r
201 echo.Build finished. The manual pages are in %BUILDDIR%/man.
\r
205 if "%1" == "texinfo" (
\r
206 %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
\r
207 if errorlevel 1 exit /b 1
\r
209 echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
\r
213 if "%1" == "gettext" (
\r
214 %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
\r
215 if errorlevel 1 exit /b 1
\r
217 echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
\r
221 if "%1" == "changes" (
\r
222 %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
\r
223 if errorlevel 1 exit /b 1
\r
225 echo.The overview file is in %BUILDDIR%/changes.
\r
229 if "%1" == "linkcheck" (
\r
230 %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
\r
231 if errorlevel 1 exit /b 1
\r
233 echo.Link check complete; look for any errors in the above output ^
\r
234 or in %BUILDDIR%/linkcheck/output.txt.
\r
238 if "%1" == "doctest" (
\r
239 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
\r
240 if errorlevel 1 exit /b 1
\r
242 echo.Testing of doctests in the sources finished, look at the ^
\r
243 results in %BUILDDIR%/doctest/output.txt.
\r
247 if "%1" == "coverage" (
\r
248 %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
\r
249 if errorlevel 1 exit /b 1
\r
251 echo.Testing of coverage in the sources finished, look at the ^
\r
252 results in %BUILDDIR%/coverage/python.txt.
\r
257 %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
\r
258 if errorlevel 1 exit /b 1
\r
260 echo.Build finished. The XML files are in %BUILDDIR%/xml.
\r
264 if "%1" == "pseudoxml" (
\r
265 %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
\r
266 if errorlevel 1 exit /b 1
\r
268 echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
\r