-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
70 lines (53 loc) · 2.16 KB
/
makefile
File metadata and controls
70 lines (53 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.PHONY: test test-go test-runtime build-runtime clean compile run always build lsp
clean:
rm -rf playground/debug
rm -rf zeus-vscode/vsix
cd runtime && zig build clean
always:
rm -rf playground/debug
mkdir -p playground/debug playground/debug/out
test-verbose:
go test ./test/... -v
test-race:
go test ./test/... -race
test: test-go test-runtime
test-go:
go test ./test/...
test-e2e: build-runtime
ZEUS_HOME=$(CURDIR)/runtime/zig-out/out go test ./test/e2e/... -v -count=1
test-runtime:
cd runtime && zig build test
build-runtime:
@if [ "$(release)" = "true" ]; then \
cd runtime && zig build -Doptimize=ReleaseSmall; \
else \
cd runtime && zig build; \
fi
build-runtime-debug:
cd runtime && zig build
build-zeus-vscode:
mkdir -p zeus-vscode/vsix
cd zeus-vscode && npm run package &&npm run vsix
build-runtime-release: always
cd runtime && zig build -Doptimize=ReleaseSmall
compile: always build-runtime
@if [ "$(debug)" = "true" ]; then \
ZEUS_DEBUG=true ZEUS_HOME=$(CURDIR)/runtime/zig-out/out $(if $(filter true,$(nogc)),ZEUS_NO_GC=true) go run zeus.go build --target-dir ./playground/debug/out ./playground/$(file).zs -o ./playground/debug/$(file); \
else \
ZEUS_HOME=$(CURDIR)/runtime/zig-out/out $(if $(filter true,$(nogc)),ZEUS_NO_GC=true) go run zeus.go build ./playground/$(file).zs -o ./playground/debug/$(file); \
fi
compile-release: always
cd runtime && zig build -Doptimize=ReleaseSmall
ZEUS_HOME=$(CURDIR)/runtime/zig-out/out $(if $(filter true,$(nogc)),ZEUS_NO_GC=true) go run zeus.go build ./playground/$(file).zs -o ./playground/debug/$(file)
run: always build-runtime
@if [ "$(debug)" = "true" ]; then \
ZEUS_DEBUG=true ZEUS_HOME=$(CURDIR)/runtime/zig-out/out $(if $(filter true,$(nogc)),ZEUS_NO_GC=true) go run zeus.go build --target-dir ./playground/debug/out ./playground/$(file).zs -o ./playground/debug/$(file); \
ZEUS_GC_DEBUG=true ./playground/debug/$(file); \
else \
ZEUS_HOME=$(CURDIR)/runtime/zig-out/out $(if $(filter true,$(nogc)),ZEUS_NO_GC=true) go run zeus.go build ./playground/$(file).zs -o ./playground/debug/$(file); \
./playground/debug/$(file); \
fi
build:
go build -o zeus zeus.go
lsp: build
./zeus lsp --stdio