make.bat: Try to find Sphinx through Python if it can not be found

This commit is contained in:
anatoly techtonik 2014-02-12 13:44:29 +03:00
parent 74c7a52eca
commit fb3de03856

View File

@ -646,6 +646,14 @@ if "%%1" == "clean" (
) )
REM Check if sphinx-build is available and fallback to Python version if any
%%SPHINXBUILD%% 2> nul
if errorlevel 9009 goto sphinx_python
goto sphinx_ok
:sphinx_python
set SPHINXBUILD=python -m sphinx.__init__
%%SPHINXBUILD%% 2> nul %%SPHINXBUILD%% 2> nul
if errorlevel 9009 ( if errorlevel 9009 (
\techo. \techo.
@ -659,6 +667,9 @@ if errorlevel 9009 (
\texit /b 1 \texit /b 1
) )
:sphinx_ok
if "%%1" == "html" ( if "%%1" == "html" (
\t%%SPHINXBUILD%% -b html %%ALLSPHINXOPTS%% %%BUILDDIR%%/html \t%%SPHINXBUILD%% -b html %%ALLSPHINXOPTS%% %%BUILDDIR%%/html
\tif errorlevel 1 exit /b 1 \tif errorlevel 1 exit /b 1