Skip to content

Commit

Permalink
make.bat: quote paths when cloning tcc (#6209)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceface777 committed Aug 24, 2020
1 parent 35aeb30 commit 60eedc2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions make.bat
Expand Up @@ -4,7 +4,7 @@ echo Building V

REM default tcc
set tcc_url=https://github.com/vlang/tccbin_win
set tcc_dir=%~dp0thirdparty\tcc
set tcc_dir="%~dp0thirdparty\tcc"

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

:fresh_tcc
rd /s /q %tcc_dir%
rd /s /q "%tcc_dir%"

:clone_tcc
git clone --depth 1 --quiet %tcc_url% %tcc_dir%
git clone --depth 1 --quiet "%tcc_url%" "%tcc_dir%"
set cloned_tcc=1
goto :tcc_strap

Expand All @@ -122,7 +122,7 @@ echo Attempting to build v.c with TCC...
where /q tcc
if %ERRORLEVEL% NEQ 0 (
if exist "%tcc_dir%" (
set tcc_exe=%tcc_dir%\tcc.exe
set tcc_exe="%tcc_dir%\tcc.exe"
) else if "%cloned_tcc%"=="" (
echo ^> TCC not found
echo ^> Downloading TCC from %tcc_url%
Expand All @@ -143,8 +143,7 @@ if exist "%tcc_dir%" (
popd
)
)

%tcc_exe% -std=c99 -municode -lws2_32 -lshell32 -ladvapi32 -bt10 -w -o v.exe vc\v_win.c
"%tcc_exe%" -std=c99 -municode -lws2_32 -lshell32 -ladvapi32 -bt10 -w -o v.exe vc\v_win.c
if %ERRORLEVEL% NEQ 0 goto :compile_error

echo ^> Compiling with .\v.exe self
Expand Down

0 comments on commit 60eedc2

Please sign in to comment.