mirror of
https://github.com/python/cpython.git
synced 2025-09-30 12:21:51 +00:00
Fix build issues in Doc/make.bat (#3663)
This commit is contained in:
parent
d8c174afd5
commit
564747d91b
1 changed files with 10 additions and 8 deletions
18
Doc/make.bat
18
Doc/make.bat
|
@ -58,7 +58,7 @@ if "%1" EQU "help" goto help
|
||||||
if "%1" EQU "check" goto check
|
if "%1" EQU "check" goto check
|
||||||
if "%1" EQU "serve" goto serve
|
if "%1" EQU "serve" goto serve
|
||||||
if "%1" == "clean" (
|
if "%1" == "clean" (
|
||||||
rmdir /q /s %BUILDDIR%
|
rmdir /q /s "%BUILDDIR%"
|
||||||
goto end
|
goto end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -107,6 +107,8 @@ echo.be passed by setting the SPHINXOPTS environment variable.
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
:build
|
:build
|
||||||
|
if not exist "%BUILDDIR%" mkdir "%BUILDDIR%"
|
||||||
|
|
||||||
if exist ..\Misc\NEWS (
|
if exist ..\Misc\NEWS (
|
||||||
echo.Copying Misc\NEWS to build\NEWS
|
echo.Copying Misc\NEWS to build\NEWS
|
||||||
copy ..\Misc\NEWS build\NEWS > nul
|
copy ..\Misc\NEWS build\NEWS > nul
|
||||||
|
@ -123,10 +125,10 @@ if exist ..\Misc\NEWS (
|
||||||
if NOT "%PAPER%" == "" (
|
if NOT "%PAPER%" == "" (
|
||||||
set SPHINXOPTS=-D latex_elements.papersize=%PAPER% %SPHINXOPTS%
|
set SPHINXOPTS=-D latex_elements.papersize=%PAPER% %SPHINXOPTS%
|
||||||
)
|
)
|
||||||
cmd /C %SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . %BUILDDIR%\%*
|
cmd /S /C "%SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . "%BUILDDIR%\%1" %2 %3 %4 %5 %6 %7 %8 %9"
|
||||||
|
|
||||||
if "%1" EQU "htmlhelp" (
|
if "%1" EQU "htmlhelp" (
|
||||||
cmd /C "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
|
"%HTMLHELP%" "%BUILDDIR%\htmlhelp\python%DISTVERSION:.=%.hhp"
|
||||||
rem hhc.exe seems to always exit with code 1, reset to 0 for less than 2
|
rem hhc.exe seems to always exit with code 1, reset to 0 for less than 2
|
||||||
if not errorlevel 2 cmd /C exit /b 0
|
if not errorlevel 2 cmd /C exit /b 0
|
||||||
)
|
)
|
||||||
|
@ -146,19 +148,19 @@ if NOT "%2" EQU "" (
|
||||||
)
|
)
|
||||||
cmd /C %this% html
|
cmd /C %this% html
|
||||||
|
|
||||||
if EXIST %BUILDDIR%\html\index.html (
|
if EXIST "%BUILDDIR%\html\index.html" (
|
||||||
echo.Opening %BUILDDIR%\html\index.html in the default web browser...
|
echo.Opening "%BUILDDIR%\html\index.html" in the default web browser...
|
||||||
start %BUILDDIR%\html\index.html
|
start "%BUILDDIR%\html\index.html"
|
||||||
)
|
)
|
||||||
|
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
:check
|
:check
|
||||||
cmd /C %PYTHON% tools\rstlint.py -i tools
|
cmd /S /C "%PYTHON% tools\rstlint.py -i tools"
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
:serve
|
:serve
|
||||||
cmd /C %PYTHON% ..\Tools\scripts\serve.py %BUILDDIR%\html
|
cmd /S /C "%PYTHON% ..\Tools\scripts\serve.py "%BUILDDIR%\html""
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
:end
|
:end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue