make.bat: use uniform indentation throughout file (#19612)

This commit is contained in:
Turiiya 2023-10-22 22:52:25 +02:00 committed by GitHub
parent 9ece982fed
commit ee05bb5400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,29 +41,29 @@ if ["%~1"] == [""] goto :init
REM Target options
if !shift_counter! LSS 1 (
if "%~1" == "help" (
if not ["%~2"] == [""] set subcmd=%~2& shift& set /a shift_counter+=1
)
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" == "help" (
if not ["%~2"] == [""] set subcmd=%~2& shift& set /a shift_counter+=1
)
for %%z in (build clean cleanall check help rebuild) do (
if "%~1" == "%%z" set target=%1& shift& set /a shift_counter+=1& goto :verifyopt
)
)
REM Compiler option
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
if "%~1" == "--local" (
if !flag_local! NEQ 0 (
echo The flag %~1 has already been specified. 1>&2
exit /b 2
)
set /a flag_local=1
set /a shift_counter+=1
shift
goto :verifyopt
if !flag_local! NEQ 0 (
echo The flag %~1 has already been specified. 1>&2
exit /b 2
)
set /a flag_local=1
set /a shift_counter+=1
shift
goto :verifyopt
)
echo Undefined option: %~1
@ -104,26 +104,26 @@ goto :build
:help
if [!subcmd!] == [] (
call :usage
call :usage
) else (
call :help_!subcmd!
call :help_!subcmd!
)
if %ERRORLEVEL% NEQ 0 echo Invalid subcommand: !subcmd!
exit /b %ERRORLEVEL%
:build
if !flag_local! NEQ 1 (
call :download_tcc
if %ERRORLEVEL% NEQ 0 goto :error
pushd "%vc_dir%" && (
echo Updating vc...
echo ^> Sync with remote !vc_url!
cd %vc_dir%
git pull --quiet
cd ..
popd
) || call :cloning_vc
echo.
call :download_tcc
if %ERRORLEVEL% NEQ 0 goto :error
pushd "%vc_dir%" && (
echo Updating vc...
echo ^> Sync with remote !vc_url!
cd %vc_dir%
git pull --quiet
cd ..
popd
) || call :cloning_vc
echo.
)
echo Building V...
@ -216,9 +216,9 @@ set ObjFile=.v.c.obj
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
if %ERRORLEVEL% NEQ 0 (
echo In some cases, compile errors happen because of the MSVC compiler version
cl.exe
goto :compile_error
echo In some cases, compile errors happen because of the MSVC compiler version
cl.exe
goto :compile_error
)
echo ^> Compiling "%V_EXE%" with "%V_BOOTSTRAP%"
@ -230,10 +230,10 @@ goto :success
:download_tcc
pushd "%tcc_dir%" && (
echo Updating TCC
echo ^> Syncing TCC from !tcc_url!
git pull --quiet
popd
echo Updating TCC
echo ^> Syncing TCC from !tcc_url!
git pull --quiet
popd
) || call :bootstrap_tcc
if [!tcc_exe!] == [] echo ^> TCC not found, even after cloning& goto :error