2015-09-18 19:22:55 +03:00
|
|
|
@ECHO OFF
|
|
|
|
|
|
|
|
REM Command file for Sphinx documentation
|
|
|
|
|
|
|
|
if "%SPHINXBUILD%" == "" (
|
|
|
|
set SPHINXBUILD=sphinx-build
|
|
|
|
)
|
2024-10-03 16:03:16 +03:00
|
|
|
set SOURCEDIR=.
|
2015-09-18 19:22:55 +03:00
|
|
|
set BUILDDIR=_build
|
2024-10-03 16:03:16 +03:00
|
|
|
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS%
|
2015-09-18 19:22:55 +03:00
|
|
|
set I18NSPHINXOPTS=%SPHINXOPTS% .
|
|
|
|
|
|
|
|
if "%1" == "" goto help
|
|
|
|
|
|
|
|
if "%1" == "help" (
|
|
|
|
:help
|
|
|
|
echo.Please use `make ^<target^>` where ^<target^> is one of
|
2024-10-03 16:03:16 +03:00
|
|
|
echo. clean to clean the build directory
|
2015-09-18 19:22:55 +03:00
|
|
|
echo. html to make standalone HTML files
|
2024-10-03 16:03:16 +03:00
|
|
|
echo. livehtml to build and serve docs with live reload
|
2015-09-18 19:22:55 +03:00
|
|
|
echo. linkcheck to check all external links for integrity
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
|
|
|
if "%1" == "clean" (
|
|
|
|
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
|
|
|
del /q /s %BUILDDIR%\*
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
|
|
|
if "%1" == "html" (
|
2024-10-03 16:03:16 +03:00
|
|
|
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %SOURCEDIR% %BUILDDIR%/html
|
2015-09-18 19:22:55 +03:00
|
|
|
if errorlevel 1 exit /b 1
|
|
|
|
echo.
|
|
|
|
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
2024-10-03 16:03:16 +03:00
|
|
|
if "%1" == "livehtml" (
|
|
|
|
sphinx-autobuild -b html --port 9000 --watch . -c . %SOURCEDIR% %BUILDDIR%/html
|
|
|
|
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
2015-09-18 19:22:55 +03:00
|
|
|
if errorlevel 1 exit /b 1
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
|
|
|
if "%1" == "linkcheck" (
|
2024-10-03 16:03:16 +03:00
|
|
|
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %SOURCEDIR% %BUILDDIR%/linkcheck
|
2015-09-18 19:22:55 +03:00
|
|
|
if errorlevel 1 exit /b 1
|
|
|
|
echo.
|
|
|
|
echo.Link check complete; look for any errors in the above output ^
|
|
|
|
or in %BUILDDIR%/linkcheck/output.txt.
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
|
|
|
:end
|