bgneal@51: @ECHO OFF bgneal@51: bgneal@51: REM Command file for Sphinx documentation bgneal@51: bgneal@51: if "%SPHINXBUILD%" == "" ( bgneal@51: set SPHINXBUILD=sphinx-build bgneal@51: ) bgneal@51: set BUILDDIR=_build bgneal@51: set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . bgneal@51: set I18NSPHINXOPTS=%SPHINXOPTS% . bgneal@51: if NOT "%PAPER%" == "" ( bgneal@51: set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% bgneal@51: set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "" goto help bgneal@51: bgneal@51: if "%1" == "help" ( bgneal@51: :help bgneal@51: echo.Please use `make ^` where ^ is one of bgneal@51: echo. html to make standalone HTML files bgneal@51: echo. dirhtml to make HTML files named index.html in directories bgneal@51: echo. singlehtml to make a single large HTML file bgneal@51: echo. pickle to make pickle files bgneal@51: echo. json to make JSON files bgneal@51: echo. htmlhelp to make HTML files and a HTML help project bgneal@51: echo. qthelp to make HTML files and a qthelp project bgneal@51: echo. devhelp to make HTML files and a Devhelp project bgneal@51: echo. epub to make an epub bgneal@51: echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter bgneal@51: echo. text to make text files bgneal@51: echo. man to make manual pages bgneal@51: echo. texinfo to make Texinfo files bgneal@51: echo. gettext to make PO message catalogs bgneal@51: echo. changes to make an overview over all changed/added/deprecated items bgneal@51: echo. xml to make Docutils-native XML files bgneal@51: echo. pseudoxml to make pseudoxml-XML files for display purposes bgneal@51: echo. linkcheck to check all external links for integrity bgneal@51: echo. doctest to run all doctests embedded in the documentation if enabled bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "clean" ( bgneal@51: for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i bgneal@51: del /q /s %BUILDDIR%\* bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: bgneal@51: %SPHINXBUILD% 2> nul bgneal@51: if errorlevel 9009 ( bgneal@51: echo. bgneal@51: echo.The 'sphinx-build' command was not found. Make sure you have Sphinx bgneal@51: echo.installed, then set the SPHINXBUILD environment variable to point bgneal@51: echo.to the full path of the 'sphinx-build' executable. Alternatively you bgneal@51: echo.may add the Sphinx directory to PATH. bgneal@51: echo. bgneal@51: echo.If you don't have Sphinx installed, grab it from bgneal@51: echo.http://sphinx-doc.org/ bgneal@51: exit /b 1 bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "html" ( bgneal@51: %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished. The HTML pages are in %BUILDDIR%/html. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "dirhtml" ( bgneal@51: %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "singlehtml" ( bgneal@51: %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "pickle" ( bgneal@51: %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished; now you can process the pickle files. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "json" ( bgneal@51: %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished; now you can process the JSON files. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "htmlhelp" ( bgneal@51: %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished; now you can run HTML Help Workshop with the ^ bgneal@51: .hhp project file in %BUILDDIR%/htmlhelp. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "qthelp" ( bgneal@51: %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished; now you can run "qcollectiongenerator" with the ^ bgneal@51: .qhcp project file in %BUILDDIR%/qthelp, like this: bgneal@51: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\m209.qhcp bgneal@51: echo.To view the help file: bgneal@51: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\m209.ghc bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "devhelp" ( bgneal@51: %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "epub" ( bgneal@51: %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished. The epub file is in %BUILDDIR%/epub. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "latex" ( bgneal@51: %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "latexpdf" ( bgneal@51: %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex bgneal@51: cd %BUILDDIR%/latex bgneal@51: make all-pdf bgneal@51: cd %BUILDDIR%/.. bgneal@51: echo. bgneal@51: echo.Build finished; the PDF files are in %BUILDDIR%/latex. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "latexpdfja" ( bgneal@51: %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex bgneal@51: cd %BUILDDIR%/latex bgneal@51: make all-pdf-ja bgneal@51: cd %BUILDDIR%/.. bgneal@51: echo. bgneal@51: echo.Build finished; the PDF files are in %BUILDDIR%/latex. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "text" ( bgneal@51: %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished. The text files are in %BUILDDIR%/text. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "man" ( bgneal@51: %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished. The manual pages are in %BUILDDIR%/man. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "texinfo" ( bgneal@51: %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "gettext" ( bgneal@51: %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished. The message catalogs are in %BUILDDIR%/locale. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "changes" ( bgneal@51: %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.The overview file is in %BUILDDIR%/changes. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "linkcheck" ( bgneal@51: %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Link check complete; look for any errors in the above output ^ bgneal@51: or in %BUILDDIR%/linkcheck/output.txt. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "doctest" ( bgneal@51: %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Testing of doctests in the sources finished, look at the ^ bgneal@51: results in %BUILDDIR%/doctest/output.txt. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "xml" ( bgneal@51: %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished. The XML files are in %BUILDDIR%/xml. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: if "%1" == "pseudoxml" ( bgneal@51: %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml bgneal@51: if errorlevel 1 exit /b 1 bgneal@51: echo. bgneal@51: echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. bgneal@51: goto end bgneal@51: ) bgneal@51: bgneal@51: :end