mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
make.bat: use uniform indentation throughout file (#19612)
This commit is contained in:
parent
9ece982fed
commit
ee05bb5400
1 changed files with 35 additions and 35 deletions
70
make.bat
70
make.bat
|
@ -41,29 +41,29 @@ if ["%~1"] == [""] goto :init
|
||||||
|
|
||||||
REM Target options
|
REM Target options
|
||||||
if !shift_counter! LSS 1 (
|
if !shift_counter! LSS 1 (
|
||||||
if "%~1" == "help" (
|
if "%~1" == "help" (
|
||||||
if not ["%~2"] == [""] set subcmd=%~2& shift& set /a shift_counter+=1
|
if not ["%~2"] == [""] set subcmd=%~2& shift& set /a shift_counter+=1
|
||||||
)
|
)
|
||||||
for %%z in (build clean cleanall check help rebuild) do (
|
for %%z in (build clean cleanall check help rebuild) do (
|
||||||
if "%~1" == "%%z" set target=%1& shift& set /a shift_counter+=1& goto :verifyopt
|
if "%~1" == "%%z" set target=%1& shift& set /a shift_counter+=1& goto :verifyopt
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
REM Compiler option
|
REM Compiler option
|
||||||
for %%g in (-gcc -msvc -tcc -tcc32 -clang) do (
|
for %%g in (-gcc -msvc -tcc -tcc32 -clang) do (
|
||||||
if "%~1" == "%%g" set compiler=%~1& set compiler=!compiler:~1!& shift& set /a shift_counter+=1& goto :verifyopt
|
if "%~1" == "%%g" set compiler=%~1& set compiler=!compiler:~1!& shift& set /a shift_counter+=1& goto :verifyopt
|
||||||
)
|
)
|
||||||
|
|
||||||
REM Standard options
|
REM Standard options
|
||||||
if "%~1" == "--local" (
|
if "%~1" == "--local" (
|
||||||
if !flag_local! NEQ 0 (
|
if !flag_local! NEQ 0 (
|
||||||
echo The flag %~1 has already been specified. 1>&2
|
echo The flag %~1 has already been specified. 1>&2
|
||||||
exit /b 2
|
exit /b 2
|
||||||
)
|
)
|
||||||
set /a flag_local=1
|
set /a flag_local=1
|
||||||
set /a shift_counter+=1
|
set /a shift_counter+=1
|
||||||
shift
|
shift
|
||||||
goto :verifyopt
|
goto :verifyopt
|
||||||
)
|
)
|
||||||
|
|
||||||
echo Undefined option: %~1
|
echo Undefined option: %~1
|
||||||
|
@ -104,26 +104,26 @@ goto :build
|
||||||
|
|
||||||
:help
|
:help
|
||||||
if [!subcmd!] == [] (
|
if [!subcmd!] == [] (
|
||||||
call :usage
|
call :usage
|
||||||
) else (
|
) else (
|
||||||
call :help_!subcmd!
|
call :help_!subcmd!
|
||||||
)
|
)
|
||||||
if %ERRORLEVEL% NEQ 0 echo Invalid subcommand: !subcmd!
|
if %ERRORLEVEL% NEQ 0 echo Invalid subcommand: !subcmd!
|
||||||
exit /b %ERRORLEVEL%
|
exit /b %ERRORLEVEL%
|
||||||
|
|
||||||
:build
|
:build
|
||||||
if !flag_local! NEQ 1 (
|
if !flag_local! NEQ 1 (
|
||||||
call :download_tcc
|
call :download_tcc
|
||||||
if %ERRORLEVEL% NEQ 0 goto :error
|
if %ERRORLEVEL% NEQ 0 goto :error
|
||||||
pushd "%vc_dir%" && (
|
pushd "%vc_dir%" && (
|
||||||
echo Updating vc...
|
echo Updating vc...
|
||||||
echo ^> Sync with remote !vc_url!
|
echo ^> Sync with remote !vc_url!
|
||||||
cd %vc_dir%
|
cd %vc_dir%
|
||||||
git pull --quiet
|
git pull --quiet
|
||||||
cd ..
|
cd ..
|
||||||
popd
|
popd
|
||||||
) || call :cloning_vc
|
) || call :cloning_vc
|
||||||
echo.
|
echo.
|
||||||
)
|
)
|
||||||
|
|
||||||
echo Building V...
|
echo Building V...
|
||||||
|
@ -216,9 +216,9 @@ set ObjFile=.v.c.obj
|
||||||
echo ^> Attempting to build "%V_BOOTSTRAP%" (from v_win.c) with MSVC
|
echo ^> Attempting to build "%V_BOOTSTRAP%" (from v_win.c) with MSVC
|
||||||
cl.exe /volatile:ms /Fo%ObjFile% /W0 /MD /D_VBOOTSTRAP "vc/v_win.c" user32.lib kernel32.lib advapi32.lib shell32.lib /link /nologo /out:"%V_BOOTSTRAP%" /incremental:no
|
cl.exe /volatile:ms /Fo%ObjFile% /W0 /MD /D_VBOOTSTRAP "vc/v_win.c" user32.lib kernel32.lib advapi32.lib shell32.lib /link /nologo /out:"%V_BOOTSTRAP%" /incremental:no
|
||||||
if %ERRORLEVEL% NEQ 0 (
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
echo In some cases, compile errors happen because of the MSVC compiler version
|
echo In some cases, compile errors happen because of the MSVC compiler version
|
||||||
cl.exe
|
cl.exe
|
||||||
goto :compile_error
|
goto :compile_error
|
||||||
)
|
)
|
||||||
|
|
||||||
echo ^> Compiling "%V_EXE%" with "%V_BOOTSTRAP%"
|
echo ^> Compiling "%V_EXE%" with "%V_BOOTSTRAP%"
|
||||||
|
@ -230,10 +230,10 @@ goto :success
|
||||||
|
|
||||||
:download_tcc
|
:download_tcc
|
||||||
pushd "%tcc_dir%" && (
|
pushd "%tcc_dir%" && (
|
||||||
echo Updating TCC
|
echo Updating TCC
|
||||||
echo ^> Syncing TCC from !tcc_url!
|
echo ^> Syncing TCC from !tcc_url!
|
||||||
git pull --quiet
|
git pull --quiet
|
||||||
popd
|
popd
|
||||||
) || call :bootstrap_tcc
|
) || call :bootstrap_tcc
|
||||||
|
|
||||||
if [!tcc_exe!] == [] echo ^> TCC not found, even after cloning& goto :error
|
if [!tcc_exe!] == [] echo ^> TCC not found, even after cloning& goto :error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue