33
44ZIG := zig
55BC := $(dir $(abspath $(lastword $(MAKEFILE_LIST ) ) ) )
6- # option test filter make unittest F="server"
6+ # option test filter make test F="server"
77F =
88
99# OS and ARCH
4747
4848# $(ZIG) commands
4949# ------------
50- .PHONY : build build-dev run run-release shell test bench download-zig wpt unittest data
50+ .PHONY : build build-dev run run-release shell test bench download-zig wpt data
5151
5252zig_version = $(shell grep 'recommended_zig_version = "' "vendor/zig-js-runtime/build.zig" | cut -d'"' -f2)
5353
@@ -62,13 +62,13 @@ download-zig:
6262# # Build in release-safe mode
6363build :
6464 @printf " \e[36mBuilding (release safe)...\e[0m\n"
65- $(ZIG ) build -Doptimize=ReleaseSafe -Dengine=v8 - Dgit_commit=$$(git rev-parse --short HEAD ) || (printf " \e[33mBuild ERROR\e[0m\n" ; exit 1; )
65+ $(ZIG ) build -Doptimize=ReleaseSafe -Dgit_commit=$$(git rev-parse --short HEAD ) || (printf " \e[33mBuild ERROR\e[0m\n" ; exit 1; )
6666 @printf " \e[33mBuild OK\e[0m\n"
6767
6868# # Build in debug mode
6969build-dev :
7070 @printf " \e[36mBuilding (debug)...\e[0m\n"
71- @$(ZIG ) build -Dengine=v8 - Dgit_commit=$$(git rev-parse --short HEAD ) || (printf " \e[33mBuild ERROR\e[0m\n" ; exit 1; )
71+ @$(ZIG ) build -Dgit_commit=$$(git rev-parse --short HEAD ) || (printf " \e[33mBuild ERROR\e[0m\n" ; exit 1; )
7272 @printf " \e[33mBuild OK\e[0m\n"
7373
7474# # Run the server in debug mode
@@ -79,16 +79,16 @@ run: build
7979# # Run a JS shell in debug mode
8080shell :
8181 @printf " \e[36mBuilding shell...\e[0m\n"
82- @$(ZIG ) build shell -Dengine=v8 || (printf " \e[33mBuild ERROR\e[0m\n" ; exit 1; )
82+ @$(ZIG ) build shell || (printf " \e[33mBuild ERROR\e[0m\n" ; exit 1; )
8383
8484# # Run WPT tests
8585wpt :
8686 @printf " \e[36mBuilding wpt...\e[0m\n"
87- @$(ZIG ) build wpt -Dengine=v8 - - --safe $(filter-out $@ ,$(MAKECMDGOALS ) ) || (printf " \e[33mBuild ERROR\e[0m\n" ; exit 1; )
87+ @$(ZIG ) build wpt -- --safe $(filter-out $@ ,$(MAKECMDGOALS ) ) || (printf " \e[33mBuild ERROR\e[0m\n" ; exit 1; )
8888
8989wpt-summary :
9090 @printf " \e[36mBuilding wpt...\e[0m\n"
91- @$(ZIG ) build wpt -Dengine=v8 - - --safe --summary $(filter-out $@ ,$(MAKECMDGOALS ) ) || (printf " \e[33mBuild ERROR\e[0m\n" ; exit 1; )
91+ @$(ZIG ) build wpt -- --safe --summary $(filter-out $@ ,$(MAKECMDGOALS ) ) || (printf " \e[33mBuild ERROR\e[0m\n" ; exit 1; )
9292
9393# # Test
9494test :
0 commit comments