Skip to content

Commit 60eedc2

Browse files
authored
make.bat: quote paths when cloning tcc (#6209)
1 parent 35aeb30 commit 60eedc2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

make.bat

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ echo Building V
44

55
REM default tcc
66
set tcc_url=https://github.com/vlang/tccbin_win
7-
set tcc_dir=%~dp0thirdparty\tcc
7+
set tcc_dir="%~dp0thirdparty\tcc"
88

99
REM let a particular environment specify their own tcc
1010
if "%TCC_GIT%" =="" goto :init
@@ -108,10 +108,10 @@ if %ERRORLEVEL% NEQ 0 goto :compile_error
108108
goto :success
109109

110110
:fresh_tcc
111-
rd /s /q %tcc_dir%
111+
rd /s /q "%tcc_dir%"
112112

113113
:clone_tcc
114-
git clone --depth 1 --quiet %tcc_url% %tcc_dir%
114+
git clone --depth 1 --quiet "%tcc_url%" "%tcc_dir%"
115115
set cloned_tcc=1
116116
goto :tcc_strap
117117

@@ -122,7 +122,7 @@ echo Attempting to build v.c with TCC...
122122
where /q tcc
123123
if %ERRORLEVEL% NEQ 0 (
124124
if exist "%tcc_dir%" (
125-
set tcc_exe=%tcc_dir%\tcc.exe
125+
set tcc_exe="%tcc_dir%\tcc.exe"
126126
) else if "%cloned_tcc%"=="" (
127127
echo ^> TCC not found
128128
echo ^> Downloading TCC from %tcc_url%
@@ -143,8 +143,7 @@ if exist "%tcc_dir%" (
143143
popd
144144
)
145145
)
146-
147-
%tcc_exe% -std=c99 -municode -lws2_32 -lshell32 -ladvapi32 -bt10 -w -o v.exe vc\v_win.c
146+
"%tcc_exe%" -std=c99 -municode -lws2_32 -lshell32 -ladvapi32 -bt10 -w -o v.exe vc\v_win.c
148147
if %ERRORLEVEL% NEQ 0 goto :compile_error
149148

150149
echo ^> Compiling with .\v.exe self

0 commit comments

Comments
 (0)