mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: support v -watch run
(#9577)
This commit is contained in:
parent
82f3ca2d55
commit
c698fa1a58
16 changed files with 701 additions and 78 deletions
46
make.bat
46
make.bat
|
@ -162,15 +162,7 @@ if !flag_local! NEQ 1 (
|
|||
cd ..>>"!log_file!" 2>NUL
|
||||
)
|
||||
popd
|
||||
) || (
|
||||
echo Cloning vc...
|
||||
echo ^> Cloning from remote !vc_url!
|
||||
if !flag_verbose! EQU 1 (
|
||||
echo [Debug] git clone --depth 1 --quiet %vc_url%>>"!log_file!"
|
||||
echo git clone --depth 1 --quiet %vc_url%
|
||||
)
|
||||
git clone --depth 1 --quiet %vc_url%>>"!log_file!" 2>NUL
|
||||
)
|
||||
) || call :cloning_vc
|
||||
echo.
|
||||
)
|
||||
|
||||
|
@ -178,7 +170,6 @@ echo Building V...
|
|||
if not [!compiler!] == [] goto :!compiler!_strap
|
||||
|
||||
|
||||
|
||||
REM By default, use tcc, since we have it prebuilt:
|
||||
:tcc_strap
|
||||
:tcc32_strap
|
||||
|
@ -308,8 +299,6 @@ del %ObjFile%>>"!log_file!" 2>>&1
|
|||
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
||||
goto :success
|
||||
|
||||
|
||||
|
||||
:download_tcc
|
||||
pushd %tcc_dir% 2>NUL && (
|
||||
echo Updating TCC
|
||||
|
@ -320,16 +309,8 @@ pushd %tcc_dir% 2>NUL && (
|
|||
)
|
||||
git pull --quiet>>"!log_file!" 2>NUL
|
||||
popd
|
||||
) || (
|
||||
echo Bootstraping TCC...
|
||||
echo ^> TCC not found
|
||||
if "!tcc_branch!" == "thirdparty-windows-i386" ( echo ^> Downloading TCC32 from !tcc_url! ) else ( echo ^> Downloading TCC64 from !tcc_url! )
|
||||
if !flag_verbose! EQU 1 (
|
||||
echo [Debug] git clone --depth 1 --quiet --single-branch --branch !tcc_branch! !tcc_url! "%tcc_dir%">>"!log_file!"
|
||||
echo git clone --depth 1 --quiet --single-branch --branch !tcc_branch! !tcc_url! "%tcc_dir%"
|
||||
)
|
||||
git clone --depth 1 --quiet --single-branch --branch !tcc_branch! !tcc_url! "%tcc_dir%">>"!log_file!" 2>NUL
|
||||
)
|
||||
) || call :bootstrap_tcc
|
||||
|
||||
for /f "usebackq delims=" %%i in (`dir "%tcc_dir%" /b /a /s tcc.exe`) do (
|
||||
set "attrib=%%~ai"
|
||||
set "dattrib=%attrib:~0,1%"
|
||||
|
@ -426,6 +407,27 @@ echo file
|
|||
echo --verbose Output compilation commands to stdout
|
||||
exit /b 0
|
||||
|
||||
:bootstrap_tcc
|
||||
echo Bootstraping TCC...
|
||||
echo ^> TCC not found
|
||||
if "!tcc_branch!" == "thirdparty-windows-i386" ( echo ^> Downloading TCC32 from !tcc_url! ) else ( echo ^> Downloading TCC64 from !tcc_url! )
|
||||
if !flag_verbose! EQU 1 (
|
||||
echo [Debug] git clone --depth 1 --quiet --single-branch --branch !tcc_branch! !tcc_url! "%tcc_dir%">>"!log_file!"
|
||||
echo git clone --depth 1 --quiet --single-branch --branch !tcc_branch! !tcc_url! "%tcc_dir%"
|
||||
)
|
||||
git clone --depth 1 --quiet --single-branch --branch !tcc_branch! !tcc_url! "%tcc_dir%">>"!log_file!" 2>NUL
|
||||
exit /b 0
|
||||
|
||||
:cloning_vc
|
||||
echo Cloning vc...
|
||||
echo ^> Cloning from remote !vc_url!
|
||||
if !flag_verbose! EQU 1 (
|
||||
echo [Debug] git clone --depth 1 --quiet %vc_url%>>"!log_file!"
|
||||
echo git clone --depth 1 --quiet %vc_url%
|
||||
)
|
||||
git clone --depth 1 --quiet %vc_url%>>"!log_file!" 2>NUL
|
||||
exit /b 0
|
||||
|
||||
:eof
|
||||
popd
|
||||
endlocal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue