Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aa2bda7

Browse files
authored
Fix build issues in Doc/make.bat (#3663)
1 parent c6ce8fb commit aa2bda7

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

Doc/make.bat

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ if "%1" EQU "help" goto help
5858
if "%1" EQU "check" goto check
5959
if "%1" EQU "serve" goto serve
6060
if "%1" == "clean" (
61-
rmdir /q /s %BUILDDIR%
61+
rmdir /q /s "%BUILDDIR%"
6262
goto end
6363
)
6464

@@ -107,6 +107,8 @@ echo.be passed by setting the SPHINXOPTS environment variable.
107107
goto end
108108

109109
:build
110+
if not exist "%BUILDDIR%" mkdir "%BUILDDIR%"
111+
110112
if exist ..\Misc\NEWS (
111113
echo.Copying Misc\NEWS to build\NEWS
112114
copy ..\Misc\NEWS build\NEWS > nul
@@ -123,10 +125,10 @@ if exist ..\Misc\NEWS (
123125
if NOT "%PAPER%" == "" (
124126
set SPHINXOPTS=-D latex_elements.papersize=%PAPER% %SPHINXOPTS%
125127
)
126-
cmd /C %SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . %BUILDDIR%\%*
128+
cmd /S /C "%SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . "%BUILDDIR%\%1" %2 %3 %4 %5 %6 %7 %8 %9"
127129

128130
if "%1" EQU "htmlhelp" (
129-
cmd /C "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
131+
"%HTMLHELP%" "%BUILDDIR%\htmlhelp\python%DISTVERSION:.=%.hhp"
130132
rem hhc.exe seems to always exit with code 1, reset to 0 for less than 2
131133
if not errorlevel 2 cmd /C exit /b 0
132134
)
@@ -146,19 +148,19 @@ if NOT "%2" EQU "" (
146148
)
147149
cmd /C %this% html
148150

149-
if EXIST %BUILDDIR%\html\index.html (
150-
echo.Opening %BUILDDIR%\html\index.html in the default web browser...
151-
start %BUILDDIR%\html\index.html
151+
if EXIST "%BUILDDIR%\html\index.html" (
152+
echo.Opening "%BUILDDIR%\html\index.html" in the default web browser...
153+
start "%BUILDDIR%\html\index.html"
152154
)
153155

154156
goto end
155157

156158
:check
157-
cmd /C %PYTHON% tools\rstlint.py -i tools
159+
cmd /S /C "%PYTHON% tools\rstlint.py -i tools"
158160
goto end
159161

160162
:serve
161-
cmd /C %PYTHON% ..\Tools\scripts\serve.py %BUILDDIR%\html
163+
cmd /S /C "%PYTHON% ..\Tools\scripts\serve.py "%BUILDDIR%\html""
162164
goto end
163165

164166
:end

0 commit comments

Comments
 (0)