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