| OLD | NEW |
| 1 @ECHO OFF | 1 @ECHO OFF |
| 2 | 2 |
| 3 REM Command file for Sphinx documentation | 3 REM Command file for Sphinx documentation |
| 4 | 4 |
| 5 if "%SPHINXBUILD%" == "" ( | 5 if "%SPHINXBUILD%" == "" ( |
| 6 set SPHINXBUILD=sphinx-build | 6 set SPHINXBUILD=sphinx-build |
| 7 ) | 7 ) |
| 8 set BUILDDIR=_build | 8 set BUILDDIR=_build |
| 9 set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . | 9 set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . |
| 10 set I18NSPHINXOPTS=%SPHINXOPTS% . | |
| 11 if NOT "%PAPER%" == "" ( | 10 if NOT "%PAPER%" == "" ( |
| 12 set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% | 11 set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% |
| 13 set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% | |
| 14 ) | 12 ) |
| 15 | 13 |
| 16 if "%1" == "" goto help | 14 if "%1" == "" goto help |
| 17 | 15 |
| 18 if "%1" == "help" ( | 16 if "%1" == "help" ( |
| 19 :help | 17 :help |
| 20 echo.Please use `make ^<target^>` where ^<target^> is one of | 18 echo.Please use `make ^<target^>` where ^<target^> is one of |
| 21 echo. html to make standalone HTML files | 19 echo. html to make standalone HTML files |
| 22 echo. dirhtml to make HTML files named index.html in directories | 20 echo. dirhtml to make HTML files named index.html in directories |
| 23 echo. singlehtml to make a single large HTML file | 21 echo. singlehtml to make a single large HTML file |
| 24 echo. pickle to make pickle files | 22 echo. pickle to make pickle files |
| 25 echo. json to make JSON files | 23 echo. json to make JSON files |
| 26 echo. htmlhelp to make HTML files and a HTML help project | 24 echo. htmlhelp to make HTML files and a HTML help project |
| 27 echo. qthelp to make HTML files and a qthelp project | 25 echo. qthelp to make HTML files and a qthelp project |
| 28 echo. devhelp to make HTML files and a Devhelp project | 26 echo. devhelp to make HTML files and a Devhelp project |
| 29 echo. epub to make an epub | 27 echo. epub to make an epub |
| 30 echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=let
ter | 28 echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=let
ter |
| 31 echo. text to make text files | 29 echo. text to make text files |
| 32 echo. man to make manual pages | 30 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 | 31 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 | 32 echo. linkcheck to check all external links for integrity |
| 39 echo. doctest to run all doctests embedded in the documentation if e
nabled | 33 echo. doctest to run all doctests embedded in the documentation if e
nabled |
| 40 echo. coverage to run coverage check of the documentation if enabled | |
| 41 goto end | 34 goto end |
| 42 ) | 35 ) |
| 43 | 36 |
| 44 if "%1" == "clean" ( | 37 if "%1" == "clean" ( |
| 45 for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i | 38 for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i |
| 46 del /q /s %BUILDDIR%\* | 39 del /q /s %BUILDDIR%\* |
| 47 goto end | 40 goto end |
| 48 ) | 41 ) |
| 49 | 42 |
| 50 | |
| 51 REM Check if sphinx-build is available and fallback to Python version if any | |
| 52 %SPHINXBUILD% 1>NUL 2>NUL | |
| 53 if errorlevel 9009 goto sphinx_python | |
| 54 goto sphinx_ok | |
| 55 | |
| 56 :sphinx_python | |
| 57 | |
| 58 set SPHINXBUILD=python -m sphinx.__init__ | |
| 59 %SPHINXBUILD% 2> nul | |
| 60 if errorlevel 9009 ( | |
| 61 echo. | |
| 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 yo
u | |
| 65 echo.may add the Sphinx directory to PATH. | |
| 66 echo. | |
| 67 echo.If you don't have Sphinx installed, grab it from | |
| 68 echo.http://sphinx-doc.org/ | |
| 69 exit /b 1 | |
| 70 ) | |
| 71 | |
| 72 :sphinx_ok | |
| 73 | |
| 74 | |
| 75 if "%1" == "html" ( | 43 if "%1" == "html" ( |
| 76 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html | 44 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html |
| 77 if errorlevel 1 exit /b 1 | 45 if errorlevel 1 exit /b 1 |
| 78 echo. | 46 echo. |
| 79 echo.Build finished. The HTML pages are in %BUILDDIR%/html. | 47 echo.Build finished. The HTML pages are in %BUILDDIR%/html. |
| 80 goto end | 48 goto end |
| 81 ) | 49 ) |
| 82 | 50 |
| 83 if "%1" == "dirhtml" ( | 51 if "%1" == "dirhtml" ( |
| 84 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml | 52 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 .hhp project file in %BUILDDIR%/htmlhelp. | 88 .hhp project file in %BUILDDIR%/htmlhelp. |
| 121 goto end | 89 goto end |
| 122 ) | 90 ) |
| 123 | 91 |
| 124 if "%1" == "qthelp" ( | 92 if "%1" == "qthelp" ( |
| 125 %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp | 93 %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp |
| 126 if errorlevel 1 exit /b 1 | 94 if errorlevel 1 exit /b 1 |
| 127 echo. | 95 echo. |
| 128 echo.Build finished; now you can run "qcollectiongenerator" with the ^ | 96 echo.Build finished; now you can run "qcollectiongenerator" with the ^ |
| 129 .qhcp project file in %BUILDDIR%/qthelp, like this: | 97 .qhcp project file in %BUILDDIR%/qthelp, like this: |
| 130 » echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Requests.qhcp | 98 » echo.^> qcollectiongenerator %BUILDDIR%\qthelp\django-compressor.qhcp |
| 131 echo.To view the help file: | 99 echo.To view the help file: |
| 132 » echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Requests.ghc | 100 » echo.^> assistant -collectionFile %BUILDDIR%\qthelp\django-compressor.gh
c |
| 133 goto end | 101 goto end |
| 134 ) | 102 ) |
| 135 | 103 |
| 136 if "%1" == "devhelp" ( | 104 if "%1" == "devhelp" ( |
| 137 %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp | 105 %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp |
| 138 if errorlevel 1 exit /b 1 | 106 if errorlevel 1 exit /b 1 |
| 139 echo. | 107 echo. |
| 140 echo.Build finished. | 108 echo.Build finished. |
| 141 goto end | 109 goto end |
| 142 ) | 110 ) |
| 143 | 111 |
| 144 if "%1" == "epub" ( | 112 if "%1" == "epub" ( |
| 145 %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub | 113 %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub |
| 146 if errorlevel 1 exit /b 1 | 114 if errorlevel 1 exit /b 1 |
| 147 echo. | 115 echo. |
| 148 echo.Build finished. The epub file is in %BUILDDIR%/epub. | 116 echo.Build finished. The epub file is in %BUILDDIR%/epub. |
| 149 goto end | 117 goto end |
| 150 ) | 118 ) |
| 151 | 119 |
| 152 if "%1" == "latex" ( | 120 if "%1" == "latex" ( |
| 153 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex | 121 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex |
| 154 if errorlevel 1 exit /b 1 | 122 if errorlevel 1 exit /b 1 |
| 155 echo. | 123 echo. |
| 156 echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. | 124 echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. |
| 157 goto end | 125 goto end |
| 158 ) | 126 ) |
| 159 | 127 |
| 160 if "%1" == "latexpdf" ( | |
| 161 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex | |
| 162 cd %BUILDDIR%/latex | |
| 163 make all-pdf | |
| 164 cd %~dp0 | |
| 165 echo. | |
| 166 echo.Build finished; the PDF files are in %BUILDDIR%/latex. | |
| 167 goto end | |
| 168 ) | |
| 169 | |
| 170 if "%1" == "latexpdfja" ( | |
| 171 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex | |
| 172 cd %BUILDDIR%/latex | |
| 173 make all-pdf-ja | |
| 174 cd %~dp0 | |
| 175 echo. | |
| 176 echo.Build finished; the PDF files are in %BUILDDIR%/latex. | |
| 177 goto end | |
| 178 ) | |
| 179 | |
| 180 if "%1" == "text" ( | 128 if "%1" == "text" ( |
| 181 %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text | 129 %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text |
| 182 if errorlevel 1 exit /b 1 | 130 if errorlevel 1 exit /b 1 |
| 183 echo. | 131 echo. |
| 184 echo.Build finished. The text files are in %BUILDDIR%/text. | 132 echo.Build finished. The text files are in %BUILDDIR%/text. |
| 185 goto end | 133 goto end |
| 186 ) | 134 ) |
| 187 | 135 |
| 188 if "%1" == "man" ( | 136 if "%1" == "man" ( |
| 189 %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man | 137 %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man |
| 190 if errorlevel 1 exit /b 1 | 138 if errorlevel 1 exit /b 1 |
| 191 echo. | 139 echo. |
| 192 echo.Build finished. The manual pages are in %BUILDDIR%/man. | 140 echo.Build finished. The manual pages are in %BUILDDIR%/man. |
| 193 goto end | 141 goto end |
| 194 ) | 142 ) |
| 195 | 143 |
| 196 if "%1" == "texinfo" ( | |
| 197 %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo | |
| 198 if errorlevel 1 exit /b 1 | |
| 199 echo. | |
| 200 echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. | |
| 201 goto end | |
| 202 ) | |
| 203 | |
| 204 if "%1" == "gettext" ( | |
| 205 %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale | |
| 206 if errorlevel 1 exit /b 1 | |
| 207 echo. | |
| 208 echo.Build finished. The message catalogs are in %BUILDDIR%/locale. | |
| 209 goto end | |
| 210 ) | |
| 211 | |
| 212 if "%1" == "changes" ( | 144 if "%1" == "changes" ( |
| 213 %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes | 145 %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes |
| 214 if errorlevel 1 exit /b 1 | 146 if errorlevel 1 exit /b 1 |
| 215 echo. | 147 echo. |
| 216 echo.The overview file is in %BUILDDIR%/changes. | 148 echo.The overview file is in %BUILDDIR%/changes. |
| 217 goto end | 149 goto end |
| 218 ) | 150 ) |
| 219 | 151 |
| 220 if "%1" == "linkcheck" ( | 152 if "%1" == "linkcheck" ( |
| 221 %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck | 153 %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck |
| 222 if errorlevel 1 exit /b 1 | 154 if errorlevel 1 exit /b 1 |
| 223 echo. | 155 echo. |
| 224 echo.Link check complete; look for any errors in the above output ^ | 156 echo.Link check complete; look for any errors in the above output ^ |
| 225 or in %BUILDDIR%/linkcheck/output.txt. | 157 or in %BUILDDIR%/linkcheck/output.txt. |
| 226 goto end | 158 goto end |
| 227 ) | 159 ) |
| 228 | 160 |
| 229 if "%1" == "doctest" ( | 161 if "%1" == "doctest" ( |
| 230 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest | 162 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest |
| 231 if errorlevel 1 exit /b 1 | 163 if errorlevel 1 exit /b 1 |
| 232 echo. | 164 echo. |
| 233 echo.Testing of doctests in the sources finished, look at the ^ | 165 echo.Testing of doctests in the sources finished, look at the ^ |
| 234 results in %BUILDDIR%/doctest/output.txt. | 166 results in %BUILDDIR%/doctest/output.txt. |
| 235 goto end | 167 goto end |
| 236 ) | 168 ) |
| 237 | 169 |
| 238 if "%1" == "coverage" ( | |
| 239 %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage | |
| 240 if errorlevel 1 exit /b 1 | |
| 241 echo. | |
| 242 echo.Testing of coverage in the sources finished, look at the ^ | |
| 243 results in %BUILDDIR%/coverage/python.txt. | |
| 244 goto end | |
| 245 ) | |
| 246 | |
| 247 if "%1" == "xml" ( | |
| 248 %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml | |
| 249 if errorlevel 1 exit /b 1 | |
| 250 echo. | |
| 251 echo.Build finished. The XML files are in %BUILDDIR%/xml. | |
| 252 goto end | |
| 253 ) | |
| 254 | |
| 255 if "%1" == "pseudoxml" ( | |
| 256 %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml | |
| 257 if errorlevel 1 exit /b 1 | |
| 258 echo. | |
| 259 echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. | |
| 260 goto end | |
| 261 ) | |
| 262 | |
| 263 :end | 170 :end |
| OLD | NEW |