michael@0: @ECHO OFF michael@0: michael@0: REM Command file for Sphinx documentation michael@0: michael@0: if "%SPHINXBUILD%" == "" ( michael@0: set SPHINXBUILD=sphinx-build michael@0: ) michael@0: set BUILDDIR=_build michael@0: set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . michael@0: set I18NSPHINXOPTS=%SPHINXOPTS% . michael@0: if NOT "%PAPER%" == "" ( michael@0: set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% michael@0: set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% michael@0: ) michael@0: michael@0: if "%1" == "" goto help michael@0: michael@0: if "%1" == "help" ( michael@0: :help michael@0: echo.Please use `make ^` where ^ is one of michael@0: echo. html to make standalone HTML files michael@0: echo. dirhtml to make HTML files named index.html in directories michael@0: echo. singlehtml to make a single large HTML file michael@0: echo. pickle to make pickle files michael@0: echo. json to make JSON files michael@0: echo. htmlhelp to make HTML files and a HTML help project michael@0: echo. qthelp to make HTML files and a qthelp project michael@0: echo. devhelp to make HTML files and a Devhelp project michael@0: echo. epub to make an epub michael@0: echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter michael@0: echo. text to make text files michael@0: echo. man to make manual pages michael@0: echo. texinfo to make Texinfo files michael@0: echo. gettext to make PO message catalogs michael@0: echo. changes to make an overview over all changed/added/deprecated items michael@0: echo. linkcheck to check all external links for integrity michael@0: echo. doctest to run all doctests embedded in the documentation if enabled michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "clean" ( michael@0: for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i michael@0: del /q /s %BUILDDIR%\* michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "html" ( michael@0: %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished. The HTML pages are in %BUILDDIR%/html. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "dirhtml" ( michael@0: %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "singlehtml" ( michael@0: %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "pickle" ( michael@0: %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished; now you can process the pickle files. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "json" ( michael@0: %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished; now you can process the JSON files. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "htmlhelp" ( michael@0: %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished; now you can run HTML Help Workshop with the ^ michael@0: .hhp project file in %BUILDDIR%/htmlhelp. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "qthelp" ( michael@0: %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished; now you can run "qcollectiongenerator" with the ^ michael@0: .qhcp project file in %BUILDDIR%/qthelp, like this: michael@0: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\MozBase.qhcp michael@0: echo.To view the help file: michael@0: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\MozBase.ghc michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "devhelp" ( michael@0: %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "epub" ( michael@0: %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished. The epub file is in %BUILDDIR%/epub. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "latex" ( michael@0: %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "text" ( michael@0: %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished. The text files are in %BUILDDIR%/text. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "man" ( michael@0: %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished. The manual pages are in %BUILDDIR%/man. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "texinfo" ( michael@0: %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "gettext" ( michael@0: %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Build finished. The message catalogs are in %BUILDDIR%/locale. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "changes" ( michael@0: %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.The overview file is in %BUILDDIR%/changes. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "linkcheck" ( michael@0: %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Link check complete; look for any errors in the above output ^ michael@0: or in %BUILDDIR%/linkcheck/output.txt. michael@0: goto end michael@0: ) michael@0: michael@0: if "%1" == "doctest" ( michael@0: %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest michael@0: if errorlevel 1 exit /b 1 michael@0: echo. michael@0: echo.Testing of doctests in the sources finished, look at the ^ michael@0: results in %BUILDDIR%/doctest/output.txt. michael@0: goto end michael@0: ) michael@0: michael@0: :end