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