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