mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
make files: add a make check
target, that runs v test-all
locally
This commit is contained in:
parent
91c1157810
commit
aed2d0caf2
@ -76,7 +76,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: all clean fresh_vc fresh_tcc check_for_working_tcc
|
.PHONY: all clean check fresh_vc fresh_tcc check_for_working_tcc
|
||||||
|
|
||||||
ifdef prod
|
ifdef prod
|
||||||
VFLAGS+=-prod
|
VFLAGS+=-prod
|
||||||
@ -164,3 +164,5 @@ selfcompile-static:
|
|||||||
install:
|
install:
|
||||||
@echo 'Please use `sudo ./v symlink` instead.'
|
@echo 'Please use `sudo ./v symlink` instead.'
|
||||||
|
|
||||||
|
check:
|
||||||
|
$(V) test-all
|
||||||
|
5
Makefile
5
Makefile
@ -3,6 +3,8 @@ VFLAGS ?=
|
|||||||
CFLAGS ?=
|
CFLAGS ?=
|
||||||
LDFLAGS ?=
|
LDFLAGS ?=
|
||||||
|
|
||||||
|
.PHONY: all check
|
||||||
|
|
||||||
all:
|
all:
|
||||||
rm -rf vc/
|
rm -rf vc/
|
||||||
git clone --depth 1 --quiet https://github.com/vlang/vc
|
git clone --depth 1 --quiet https://github.com/vlang/vc
|
||||||
@ -12,3 +14,6 @@ all:
|
|||||||
rm -rf v1 v2 vc/
|
rm -rf v1 v2 vc/
|
||||||
@echo "V has been successfully built"
|
@echo "V has been successfully built"
|
||||||
./v run ./cmd/tools/detect_tcc.v
|
./v run ./cmd/tools/detect_tcc.v
|
||||||
|
|
||||||
|
check:
|
||||||
|
./v test-all
|
||||||
|
11
make.bat
11
make.bat
@ -39,7 +39,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 help) do (
|
for %%z in (build clean cleanall check help) 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
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -67,6 +67,12 @@ exit /b 2
|
|||||||
:init
|
:init
|
||||||
goto :!target!
|
goto :!target!
|
||||||
|
|
||||||
|
:check
|
||||||
|
echo.
|
||||||
|
echo Check everything
|
||||||
|
v.exe test-all
|
||||||
|
exit /b 0
|
||||||
|
|
||||||
:cleanall
|
:cleanall
|
||||||
call :clean
|
call :clean
|
||||||
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
|
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
|
||||||
@ -262,7 +268,8 @@ echo Target:
|
|||||||
echo build[default] Compiles V using the given C compiler
|
echo build[default] Compiles V using the given C compiler
|
||||||
echo clean Clean build artifacts and debugging symbols
|
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 help Display usage help for the given target
|
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.
|
echo.
|
||||||
echo Examples:
|
echo Examples:
|
||||||
echo make.bat -msvc
|
echo make.bat -msvc
|
||||||
|
Loading…
Reference in New Issue
Block a user