make.bat: optimize vc download
parent
1cc52b0fae
commit
fe0b587b1f
|
@ -18,6 +18,7 @@ a.out
|
||||||
.noprefix.vrepl_temp
|
.noprefix.vrepl_temp
|
||||||
|
|
||||||
# ignore v build files
|
# ignore v build files
|
||||||
|
/vc
|
||||||
/v.c
|
/v.c
|
||||||
/v.*.c
|
/v.*.c
|
||||||
/v.c.out
|
/v.c.out
|
||||||
|
|
15
make.bat
15
make.bat
|
@ -5,11 +5,14 @@ echo Building V
|
||||||
pushd %~dp0
|
pushd %~dp0
|
||||||
|
|
||||||
if exist "vc" (
|
if exist "vc" (
|
||||||
rd /s /q vc
|
echo Updating vc...
|
||||||
)
|
cd vc
|
||||||
|
git pull
|
||||||
echo Downloading v.c...
|
cd ..
|
||||||
|
) else (
|
||||||
|
echo Cloning vc...
|
||||||
git clone --depth 1 --quiet https://github.com/vlang/vc
|
git clone --depth 1 --quiet https://github.com/vlang/vc
|
||||||
|
)
|
||||||
|
|
||||||
REM option to force msvc or gcc
|
REM option to force msvc or gcc
|
||||||
if "%~1"=="-gcc" goto :gcc_strap
|
if "%~1"=="-gcc" goto :gcc_strap
|
||||||
|
@ -39,11 +42,9 @@ REM and it will be restored when v is a stable version.
|
||||||
v.exe self
|
v.exe self
|
||||||
if %ERRORLEVEL% NEQ 0 (
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
echo v.exe failed to compile itself - Create an issue at 'https://github.com/vlang'
|
echo v.exe failed to compile itself - Create an issue at 'https://github.com/vlang'
|
||||||
rd /s /q vc
|
|
||||||
goto :error
|
goto :error
|
||||||
)
|
)
|
||||||
|
|
||||||
rd /s /q vc
|
|
||||||
del v_old.exe
|
del v_old.exe
|
||||||
goto :success
|
goto :success
|
||||||
|
|
||||||
|
@ -81,12 +82,10 @@ REM and it will be restored when v is a stable version.
|
||||||
v.exe self
|
v.exe self
|
||||||
if %ERRORLEVEL% NEQ 0 (
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
echo V failed to build itself with error %ERRORLEVEL%
|
echo V failed to build itself with error %ERRORLEVEL%
|
||||||
rd /s /q vc
|
|
||||||
del %ObjFile%
|
del %ObjFile%
|
||||||
goto :compile_error
|
goto :compile_error
|
||||||
)
|
)
|
||||||
|
|
||||||
rd /s /q vc
|
|
||||||
del v_old.exe
|
del v_old.exe
|
||||||
del %ObjFile%
|
del %ObjFile%
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue