annotate docs/make.bat @ 61:35b5eb90f5ad

Double the length of the internal message indicator as I have seen 12 not be enough.
author Brian Neal <bgneal@gmail.com>
date Fri, 12 Jul 2013 14:32:51 -0500
parents 9c994664fdd6
children
rev   line source
bgneal@51 1 @ECHO OFF
bgneal@51 2
bgneal@51 3 REM Command file for Sphinx documentation
bgneal@51 4
bgneal@51 5 if "%SPHINXBUILD%" == "" (
bgneal@51 6 set SPHINXBUILD=sphinx-build
bgneal@51 7 )
bgneal@51 8 set BUILDDIR=_build
bgneal@51 9 set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
bgneal@51 10 set I18NSPHINXOPTS=%SPHINXOPTS% .
bgneal@51 11 if NOT "%PAPER%" == "" (
bgneal@51 12 set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
bgneal@51 13 set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
bgneal@51 14 )
bgneal@51 15
bgneal@51 16 if "%1" == "" goto help
bgneal@51 17
bgneal@51 18 if "%1" == "help" (
bgneal@51 19 :help
bgneal@51 20 echo.Please use `make ^<target^>` where ^<target^> is one of
bgneal@51 21 echo. html to make standalone HTML files
bgneal@51 22 echo. dirhtml to make HTML files named index.html in directories
bgneal@51 23 echo. singlehtml to make a single large HTML file
bgneal@51 24 echo. pickle to make pickle files
bgneal@51 25 echo. json to make JSON files
bgneal@51 26 echo. htmlhelp to make HTML files and a HTML help project
bgneal@51 27 echo. qthelp to make HTML files and a qthelp project
bgneal@51 28 echo. devhelp to make HTML files and a Devhelp project
bgneal@51 29 echo. epub to make an epub
bgneal@51 30 echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
bgneal@51 31 echo. text to make text files
bgneal@51 32 echo. man to make manual pages
bgneal@51 33 echo. texinfo to make Texinfo files
bgneal@51 34 echo. gettext to make PO message catalogs
bgneal@51 35 echo. changes to make an overview over all changed/added/deprecated items
bgneal@51 36 echo. xml to make Docutils-native XML files
bgneal@51 37 echo. pseudoxml to make pseudoxml-XML files for display purposes
bgneal@51 38 echo. linkcheck to check all external links for integrity
bgneal@51 39 echo. doctest to run all doctests embedded in the documentation if enabled
bgneal@51 40 goto end
bgneal@51 41 )
bgneal@51 42
bgneal@51 43 if "%1" == "clean" (
bgneal@51 44 for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
bgneal@51 45 del /q /s %BUILDDIR%\*
bgneal@51 46 goto end
bgneal@51 47 )
bgneal@51 48
bgneal@51 49
bgneal@51 50 %SPHINXBUILD% 2> nul
bgneal@51 51 if errorlevel 9009 (
bgneal@51 52 echo.
bgneal@51 53 echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
bgneal@51 54 echo.installed, then set the SPHINXBUILD environment variable to point
bgneal@51 55 echo.to the full path of the 'sphinx-build' executable. Alternatively you
bgneal@51 56 echo.may add the Sphinx directory to PATH.
bgneal@51 57 echo.
bgneal@51 58 echo.If you don't have Sphinx installed, grab it from
bgneal@51 59 echo.http://sphinx-doc.org/
bgneal@51 60 exit /b 1
bgneal@51 61 )
bgneal@51 62
bgneal@51 63 if "%1" == "html" (
bgneal@51 64 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
bgneal@51 65 if errorlevel 1 exit /b 1
bgneal@51 66 echo.
bgneal@51 67 echo.Build finished. The HTML pages are in %BUILDDIR%/html.
bgneal@51 68 goto end
bgneal@51 69 )
bgneal@51 70
bgneal@51 71 if "%1" == "dirhtml" (
bgneal@51 72 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
bgneal@51 73 if errorlevel 1 exit /b 1
bgneal@51 74 echo.
bgneal@51 75 echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
bgneal@51 76 goto end
bgneal@51 77 )
bgneal@51 78
bgneal@51 79 if "%1" == "singlehtml" (
bgneal@51 80 %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
bgneal@51 81 if errorlevel 1 exit /b 1
bgneal@51 82 echo.
bgneal@51 83 echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
bgneal@51 84 goto end
bgneal@51 85 )
bgneal@51 86
bgneal@51 87 if "%1" == "pickle" (
bgneal@51 88 %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
bgneal@51 89 if errorlevel 1 exit /b 1
bgneal@51 90 echo.
bgneal@51 91 echo.Build finished; now you can process the pickle files.
bgneal@51 92 goto end
bgneal@51 93 )
bgneal@51 94
bgneal@51 95 if "%1" == "json" (
bgneal@51 96 %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
bgneal@51 97 if errorlevel 1 exit /b 1
bgneal@51 98 echo.
bgneal@51 99 echo.Build finished; now you can process the JSON files.
bgneal@51 100 goto end
bgneal@51 101 )
bgneal@51 102
bgneal@51 103 if "%1" == "htmlhelp" (
bgneal@51 104 %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
bgneal@51 105 if errorlevel 1 exit /b 1
bgneal@51 106 echo.
bgneal@51 107 echo.Build finished; now you can run HTML Help Workshop with the ^
bgneal@51 108 .hhp project file in %BUILDDIR%/htmlhelp.
bgneal@51 109 goto end
bgneal@51 110 )
bgneal@51 111
bgneal@51 112 if "%1" == "qthelp" (
bgneal@51 113 %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
bgneal@51 114 if errorlevel 1 exit /b 1
bgneal@51 115 echo.
bgneal@51 116 echo.Build finished; now you can run "qcollectiongenerator" with the ^
bgneal@51 117 .qhcp project file in %BUILDDIR%/qthelp, like this:
bgneal@51 118 echo.^> qcollectiongenerator %BUILDDIR%\qthelp\m209.qhcp
bgneal@51 119 echo.To view the help file:
bgneal@51 120 echo.^> assistant -collectionFile %BUILDDIR%\qthelp\m209.ghc
bgneal@51 121 goto end
bgneal@51 122 )
bgneal@51 123
bgneal@51 124 if "%1" == "devhelp" (
bgneal@51 125 %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
bgneal@51 126 if errorlevel 1 exit /b 1
bgneal@51 127 echo.
bgneal@51 128 echo.Build finished.
bgneal@51 129 goto end
bgneal@51 130 )
bgneal@51 131
bgneal@51 132 if "%1" == "epub" (
bgneal@51 133 %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
bgneal@51 134 if errorlevel 1 exit /b 1
bgneal@51 135 echo.
bgneal@51 136 echo.Build finished. The epub file is in %BUILDDIR%/epub.
bgneal@51 137 goto end
bgneal@51 138 )
bgneal@51 139
bgneal@51 140 if "%1" == "latex" (
bgneal@51 141 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
bgneal@51 142 if errorlevel 1 exit /b 1
bgneal@51 143 echo.
bgneal@51 144 echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
bgneal@51 145 goto end
bgneal@51 146 )
bgneal@51 147
bgneal@51 148 if "%1" == "latexpdf" (
bgneal@51 149 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
bgneal@51 150 cd %BUILDDIR%/latex
bgneal@51 151 make all-pdf
bgneal@51 152 cd %BUILDDIR%/..
bgneal@51 153 echo.
bgneal@51 154 echo.Build finished; the PDF files are in %BUILDDIR%/latex.
bgneal@51 155 goto end
bgneal@51 156 )
bgneal@51 157
bgneal@51 158 if "%1" == "latexpdfja" (
bgneal@51 159 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
bgneal@51 160 cd %BUILDDIR%/latex
bgneal@51 161 make all-pdf-ja
bgneal@51 162 cd %BUILDDIR%/..
bgneal@51 163 echo.
bgneal@51 164 echo.Build finished; the PDF files are in %BUILDDIR%/latex.
bgneal@51 165 goto end
bgneal@51 166 )
bgneal@51 167
bgneal@51 168 if "%1" == "text" (
bgneal@51 169 %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
bgneal@51 170 if errorlevel 1 exit /b 1
bgneal@51 171 echo.
bgneal@51 172 echo.Build finished. The text files are in %BUILDDIR%/text.
bgneal@51 173 goto end
bgneal@51 174 )
bgneal@51 175
bgneal@51 176 if "%1" == "man" (
bgneal@51 177 %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
bgneal@51 178 if errorlevel 1 exit /b 1
bgneal@51 179 echo.
bgneal@51 180 echo.Build finished. The manual pages are in %BUILDDIR%/man.
bgneal@51 181 goto end
bgneal@51 182 )
bgneal@51 183
bgneal@51 184 if "%1" == "texinfo" (
bgneal@51 185 %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
bgneal@51 186 if errorlevel 1 exit /b 1
bgneal@51 187 echo.
bgneal@51 188 echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
bgneal@51 189 goto end
bgneal@51 190 )
bgneal@51 191
bgneal@51 192 if "%1" == "gettext" (
bgneal@51 193 %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
bgneal@51 194 if errorlevel 1 exit /b 1
bgneal@51 195 echo.
bgneal@51 196 echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
bgneal@51 197 goto end
bgneal@51 198 )
bgneal@51 199
bgneal@51 200 if "%1" == "changes" (
bgneal@51 201 %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
bgneal@51 202 if errorlevel 1 exit /b 1
bgneal@51 203 echo.
bgneal@51 204 echo.The overview file is in %BUILDDIR%/changes.
bgneal@51 205 goto end
bgneal@51 206 )
bgneal@51 207
bgneal@51 208 if "%1" == "linkcheck" (
bgneal@51 209 %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
bgneal@51 210 if errorlevel 1 exit /b 1
bgneal@51 211 echo.
bgneal@51 212 echo.Link check complete; look for any errors in the above output ^
bgneal@51 213 or in %BUILDDIR%/linkcheck/output.txt.
bgneal@51 214 goto end
bgneal@51 215 )
bgneal@51 216
bgneal@51 217 if "%1" == "doctest" (
bgneal@51 218 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
bgneal@51 219 if errorlevel 1 exit /b 1
bgneal@51 220 echo.
bgneal@51 221 echo.Testing of doctests in the sources finished, look at the ^
bgneal@51 222 results in %BUILDDIR%/doctest/output.txt.
bgneal@51 223 goto end
bgneal@51 224 )
bgneal@51 225
bgneal@51 226 if "%1" == "xml" (
bgneal@51 227 %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
bgneal@51 228 if errorlevel 1 exit /b 1
bgneal@51 229 echo.
bgneal@51 230 echo.Build finished. The XML files are in %BUILDDIR%/xml.
bgneal@51 231 goto end
bgneal@51 232 )
bgneal@51 233
bgneal@51 234 if "%1" == "pseudoxml" (
bgneal@51 235 %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
bgneal@51 236 if errorlevel 1 exit /b 1
bgneal@51 237 echo.
bgneal@51 238 echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
bgneal@51 239 goto end
bgneal@51 240 )
bgneal@51 241
bgneal@51 242 :end