make.bat: Try Sphinx installed in Python when sphinx-build is not in PATH

This commit is contained in:
anatoly techtonik
2014-02-12 13:17:29 +03:00
parent ee36d45103
commit c0fc5c18f3
+11
View File
@@ -47,6 +47,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 spinx_ok
:sphinx_python
set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
@@ -60,6 +68,9 @@ if errorlevel 9009 (
exit /b 1
)
:sphinx_ok
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1