mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
make: add 'rebuild' target (clean and reset sub-repos, then rebuild V) (#16357)
This commit is contained in:
parent
c7d0f0561e
commit
a07f77ac52
@ -85,7 +85,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: all clean check fresh_vc fresh_tcc fresh_legacy check_for_working_tcc
|
.PHONY: all clean rebuild check fresh_vc fresh_tcc fresh_legacy check_for_working_tcc
|
||||||
|
|
||||||
ifdef prod
|
ifdef prod
|
||||||
VFLAGS+=-prod
|
VFLAGS+=-prod
|
||||||
@ -119,6 +119,8 @@ clean:
|
|||||||
rm -rf $(LEGACYLIBS)
|
rm -rf $(LEGACYLIBS)
|
||||||
rm -rf $(VC)
|
rm -rf $(VC)
|
||||||
|
|
||||||
|
rebuild: clean all
|
||||||
|
|
||||||
ifndef local
|
ifndef local
|
||||||
latest_vc: $(VC)/.git/config
|
latest_vc: $(VC)/.git/config
|
||||||
cd $(VC) && $(GITCLEANPULL)
|
cd $(VC) && $(GITCLEANPULL)
|
||||||
|
19
make.bat
19
make.bat
@ -44,7 +44,7 @@ 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) 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
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -98,6 +98,10 @@ echo ^> Delete old V executable(s)
|
|||||||
del v*.exe
|
del v*.exe
|
||||||
exit /b 0
|
exit /b 0
|
||||||
|
|
||||||
|
:rebuild
|
||||||
|
call :cleanall
|
||||||
|
goto :build
|
||||||
|
|
||||||
:help
|
:help
|
||||||
if [!subcmd!] == [] (
|
if [!subcmd!] == [] (
|
||||||
call :usage
|
call :usage
|
||||||
@ -271,6 +275,7 @@ echo clean Clean build artifacts and debugging symbols
|
|||||||
echo cleanall Cleanup entire ALL build artifacts and vc repository
|
echo cleanall Cleanup entire ALL build artifacts and vc repository
|
||||||
echo check Check that tests pass, and the repository is in a good shape for Pull Requests
|
echo check Check that tests pass, and the repository is in a good shape for Pull Requests
|
||||||
echo help Display help for the given target
|
echo help Display help for the given target
|
||||||
|
echo rebuild Fully clean/reset repository and rebuild V
|
||||||
echo.
|
echo.
|
||||||
echo Examples:
|
echo Examples:
|
||||||
echo make.bat -msvc
|
echo make.bat -msvc
|
||||||
@ -316,6 +321,18 @@ echo --local Use the local vc repository without
|
|||||||
echo syncing with remote
|
echo syncing with remote
|
||||||
exit /b 0
|
exit /b 0
|
||||||
|
|
||||||
|
:help_rebuild
|
||||||
|
echo Usage:
|
||||||
|
echo make.bat rebuild [compiler] [options]
|
||||||
|
echo.
|
||||||
|
echo Compiler:
|
||||||
|
echo -msvc ^| -gcc ^| -tcc ^| -tcc32 ^| -clang Set C compiler
|
||||||
|
echo.
|
||||||
|
echo Options:
|
||||||
|
echo --local Use the local vc repository without
|
||||||
|
echo syncing with remote
|
||||||
|
exit /b 0
|
||||||
|
|
||||||
:bootstrap_tcc
|
:bootstrap_tcc
|
||||||
echo Bootstrapping TCC...
|
echo Bootstrapping TCC...
|
||||||
echo ^> TCC not found
|
echo ^> TCC not found
|
||||||
|
Loading…
Reference in New Issue
Block a user