Merged in techtonik/sphinx (pull request #223)

make.bat: Try to find Sphinx through Python if it can not be found
This commit is contained in:
Georg Brandl 2014-03-01 08:19:03 +01:00
commit ab37976bcc

View File

@ -656,6 +656,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.
@ -669,6 +677,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