-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathMakefile
39 lines (29 loc) · 1.09 KB
/
Makefile
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
get-dev:
go get -u golang.org/x/tools/cmd/benchcmp
go get -u golang.org/x/tools/cmd/stringer
go get -u github.com/ajstarks/svgo/benchviz
go get -t github.com/c9s/c6/...
gogenerate:
go generate github.com/c9s/c6/...
test: gogenerate
go test github.com/c9s/c6/...
# The tests should pass aftr `go generete` too,
# # This is to guard against changes that can break
# # with `go generate`.
go test github.com/c9s/c6/...
vet:
go vet github.com/c9s/c6/...
gofmt:
#TODO: This should fail if any file is changed.
go fmt github.com/c9s/c6/...
cover:
go test -cover -coverprofile c6.cov -coverpkg github.com/c9s/c6/ast,github.com/c9s/c6/runtime,github.com/c9s/c6/parser,github.com/c9s/c6/compiler github.com/c9s/c6/compiler
benchmark:
go test -run=NONE -bench=. github.com/c9s/c6/... >| benchmarks/new.txt
benchcmp benchmarks/old.txt benchmarks/new.txt
benchviz: benchrecord
benchcmp benchmarks/old.txt benchmarks/new.txt | benchviz -top=5 -left=5 > benchmarks/summary.svg
cross-toolchain:
gox -build-toolchain
cross-compile:
gox -output "build/{{.Dir}}.{{.OS}}_{{.Arch}}" github.com/c9s/c6/...