1*0b57cec5SDimitry Andric@ECHO OFF 2*0b57cec5SDimitry Andric 3*0b57cec5SDimitry AndricREM Command file for Sphinx documentation 4*0b57cec5SDimitry Andric 5*0b57cec5SDimitry Andricif "%SPHINXBUILD%" == "" ( 6*0b57cec5SDimitry Andric set SPHINXBUILD=sphinx-build 7*0b57cec5SDimitry Andric) 8*0b57cec5SDimitry Andricset BUILDDIR=_build 9*0b57cec5SDimitry Andricset ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10*0b57cec5SDimitry Andricset I18NSPHINXOPTS=%SPHINXOPTS% . 11*0b57cec5SDimitry Andricif NOT "%PAPER%" == "" ( 12*0b57cec5SDimitry Andric set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13*0b57cec5SDimitry Andric set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14*0b57cec5SDimitry Andric) 15*0b57cec5SDimitry Andric 16*0b57cec5SDimitry Andricif "%1" == "" goto help 17*0b57cec5SDimitry Andric 18*0b57cec5SDimitry Andricif "%1" == "help" ( 19*0b57cec5SDimitry Andric :help 20*0b57cec5SDimitry Andric echo.Please use `make ^<target^>` where ^<target^> is one of 21*0b57cec5SDimitry Andric echo. html to make standalone HTML files 22*0b57cec5SDimitry Andric echo. dirhtml to make HTML files named index.html in directories 23*0b57cec5SDimitry Andric echo. singlehtml to make a single large HTML file 24*0b57cec5SDimitry Andric echo. pickle to make pickle files 25*0b57cec5SDimitry Andric echo. json to make JSON files 26*0b57cec5SDimitry Andric echo. htmlhelp to make HTML files and a HTML help project 27*0b57cec5SDimitry Andric echo. qthelp to make HTML files and a qthelp project 28*0b57cec5SDimitry Andric echo. devhelp to make HTML files and a Devhelp project 29*0b57cec5SDimitry Andric echo. epub to make an epub 30*0b57cec5SDimitry Andric echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31*0b57cec5SDimitry Andric echo. text to make text files 32*0b57cec5SDimitry Andric echo. man to make manual pages 33*0b57cec5SDimitry Andric echo. texinfo to make Texinfo files 34*0b57cec5SDimitry Andric echo. gettext to make PO message catalogs 35*0b57cec5SDimitry Andric echo. changes to make an overview over all changed/added/deprecated items 36*0b57cec5SDimitry Andric echo. linkcheck to check all external links for integrity 37*0b57cec5SDimitry Andric echo. doctest to run all doctests embedded in the documentation if enabled 38*0b57cec5SDimitry Andric goto end 39*0b57cec5SDimitry Andric) 40*0b57cec5SDimitry Andric 41*0b57cec5SDimitry Andricif "%1" == "clean" ( 42*0b57cec5SDimitry Andric for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 43*0b57cec5SDimitry Andric del /q /s %BUILDDIR%\* 44*0b57cec5SDimitry Andric goto end 45*0b57cec5SDimitry Andric) 46*0b57cec5SDimitry Andric 47*0b57cec5SDimitry Andricif "%1" == "html" ( 48*0b57cec5SDimitry Andric %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 49*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 50*0b57cec5SDimitry Andric echo. 51*0b57cec5SDimitry Andric echo.Build finished. The HTML pages are in %BUILDDIR%/html. 52*0b57cec5SDimitry Andric goto end 53*0b57cec5SDimitry Andric) 54*0b57cec5SDimitry Andric 55*0b57cec5SDimitry Andricif "%1" == "dirhtml" ( 56*0b57cec5SDimitry Andric %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 57*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 58*0b57cec5SDimitry Andric echo. 59*0b57cec5SDimitry Andric echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 60*0b57cec5SDimitry Andric goto end 61*0b57cec5SDimitry Andric) 62*0b57cec5SDimitry Andric 63*0b57cec5SDimitry Andricif "%1" == "singlehtml" ( 64*0b57cec5SDimitry Andric %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 65*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 66*0b57cec5SDimitry Andric echo. 67*0b57cec5SDimitry Andric echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 68*0b57cec5SDimitry Andric goto end 69*0b57cec5SDimitry Andric) 70*0b57cec5SDimitry Andric 71*0b57cec5SDimitry Andricif "%1" == "pickle" ( 72*0b57cec5SDimitry Andric %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 73*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 74*0b57cec5SDimitry Andric echo. 75*0b57cec5SDimitry Andric echo.Build finished; now you can process the pickle files. 76*0b57cec5SDimitry Andric goto end 77*0b57cec5SDimitry Andric) 78*0b57cec5SDimitry Andric 79*0b57cec5SDimitry Andricif "%1" == "json" ( 80*0b57cec5SDimitry Andric %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 81*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 82*0b57cec5SDimitry Andric echo. 83*0b57cec5SDimitry Andric echo.Build finished; now you can process the JSON files. 84*0b57cec5SDimitry Andric goto end 85*0b57cec5SDimitry Andric) 86*0b57cec5SDimitry Andric 87*0b57cec5SDimitry Andricif "%1" == "htmlhelp" ( 88*0b57cec5SDimitry Andric %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 89*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 90*0b57cec5SDimitry Andric echo. 91*0b57cec5SDimitry Andric echo.Build finished; now you can run HTML Help Workshop with the ^ 92*0b57cec5SDimitry Andric.hhp project file in %BUILDDIR%/htmlhelp. 93*0b57cec5SDimitry Andric goto end 94*0b57cec5SDimitry Andric) 95*0b57cec5SDimitry Andric 96*0b57cec5SDimitry Andricif "%1" == "qthelp" ( 97*0b57cec5SDimitry Andric %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 98*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 99*0b57cec5SDimitry Andric echo. 100*0b57cec5SDimitry Andric echo.Build finished; now you can run "qcollectiongenerator" with the ^ 101*0b57cec5SDimitry Andric.qhcp project file in %BUILDDIR%/qthelp, like this: 102*0b57cec5SDimitry Andric echo.^> qcollectiongenerator %BUILDDIR%\qthelp\lld.qhcp 103*0b57cec5SDimitry Andric echo.To view the help file: 104*0b57cec5SDimitry Andric echo.^> assistant -collectionFile %BUILDDIR%\qthelp\lld.ghc 105*0b57cec5SDimitry Andric goto end 106*0b57cec5SDimitry Andric) 107*0b57cec5SDimitry Andric 108*0b57cec5SDimitry Andricif "%1" == "devhelp" ( 109*0b57cec5SDimitry Andric %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 110*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 111*0b57cec5SDimitry Andric echo. 112*0b57cec5SDimitry Andric echo.Build finished. 113*0b57cec5SDimitry Andric goto end 114*0b57cec5SDimitry Andric) 115*0b57cec5SDimitry Andric 116*0b57cec5SDimitry Andricif "%1" == "epub" ( 117*0b57cec5SDimitry Andric %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 118*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 119*0b57cec5SDimitry Andric echo. 120*0b57cec5SDimitry Andric echo.Build finished. The epub file is in %BUILDDIR%/epub. 121*0b57cec5SDimitry Andric goto end 122*0b57cec5SDimitry Andric) 123*0b57cec5SDimitry Andric 124*0b57cec5SDimitry Andricif "%1" == "latex" ( 125*0b57cec5SDimitry Andric %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 126*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 127*0b57cec5SDimitry Andric echo. 128*0b57cec5SDimitry Andric echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 129*0b57cec5SDimitry Andric goto end 130*0b57cec5SDimitry Andric) 131*0b57cec5SDimitry Andric 132*0b57cec5SDimitry Andricif "%1" == "text" ( 133*0b57cec5SDimitry Andric %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 134*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 135*0b57cec5SDimitry Andric echo. 136*0b57cec5SDimitry Andric echo.Build finished. The text files are in %BUILDDIR%/text. 137*0b57cec5SDimitry Andric goto end 138*0b57cec5SDimitry Andric) 139*0b57cec5SDimitry Andric 140*0b57cec5SDimitry Andricif "%1" == "man" ( 141*0b57cec5SDimitry Andric %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 142*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 143*0b57cec5SDimitry Andric echo. 144*0b57cec5SDimitry Andric echo.Build finished. The manual pages are in %BUILDDIR%/man. 145*0b57cec5SDimitry Andric goto end 146*0b57cec5SDimitry Andric) 147*0b57cec5SDimitry Andric 148*0b57cec5SDimitry Andricif "%1" == "texinfo" ( 149*0b57cec5SDimitry Andric %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 150*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 151*0b57cec5SDimitry Andric echo. 152*0b57cec5SDimitry Andric echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 153*0b57cec5SDimitry Andric goto end 154*0b57cec5SDimitry Andric) 155*0b57cec5SDimitry Andric 156*0b57cec5SDimitry Andricif "%1" == "gettext" ( 157*0b57cec5SDimitry Andric %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 158*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 159*0b57cec5SDimitry Andric echo. 160*0b57cec5SDimitry Andric echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 161*0b57cec5SDimitry Andric goto end 162*0b57cec5SDimitry Andric) 163*0b57cec5SDimitry Andric 164*0b57cec5SDimitry Andricif "%1" == "changes" ( 165*0b57cec5SDimitry Andric %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 166*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 167*0b57cec5SDimitry Andric echo. 168*0b57cec5SDimitry Andric echo.The overview file is in %BUILDDIR%/changes. 169*0b57cec5SDimitry Andric goto end 170*0b57cec5SDimitry Andric) 171*0b57cec5SDimitry Andric 172*0b57cec5SDimitry Andricif "%1" == "linkcheck" ( 173*0b57cec5SDimitry Andric %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 174*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 175*0b57cec5SDimitry Andric echo. 176*0b57cec5SDimitry Andric echo.Link check complete; look for any errors in the above output ^ 177*0b57cec5SDimitry Andricor in %BUILDDIR%/linkcheck/output.txt. 178*0b57cec5SDimitry Andric goto end 179*0b57cec5SDimitry Andric) 180*0b57cec5SDimitry Andric 181*0b57cec5SDimitry Andricif "%1" == "doctest" ( 182*0b57cec5SDimitry Andric %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 183*0b57cec5SDimitry Andric if errorlevel 1 exit /b 1 184*0b57cec5SDimitry Andric echo. 185*0b57cec5SDimitry Andric echo.Testing of doctests in the sources finished, look at the ^ 186*0b57cec5SDimitry Andricresults in %BUILDDIR%/doctest/output.txt. 187*0b57cec5SDimitry Andric goto end 188*0b57cec5SDimitry Andric) 189*0b57cec5SDimitry Andric 190*0b57cec5SDimitry Andric:end 191