Debian Codegraph @

Makefile

raw symbols SCIP
1 # Copyright 2017 The Memory Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style
3 # license that can be found in the LICENSE file.
4
5 .PHONY: all clean cover cpu editor internalError later mem nuke todo edit build_all_targets
6
7 grep=--include=*.go --include=*.l --include=*.y --include=*.yy
8 ngrep='TODOOK\|parser\.go\|scanner\.go\|.*_string\.go'
9
10 all: editor
11 go vet 2>&1 | grep -v $(ngrep) || true
12 golint 2>&1 | grep -v $(ngrep) || true
13 make todo
14 misspell *.go
15 maligned || true
16 unconvert -apply
17 staticcheck | grep -v 'lexer\.go' || true
18 grep -n 'FAIL\|PASS' log
19 date
20
21 clean:
22 go clean
23 rm -f *~ *.test *.out
24
25 cover:
26 t=$(shell tempfile) ; go test -coverprofile $$t && go tool cover -html $$t && unlink $$t
27
28 cpu: clean
29 go test -run @ -bench . -cpuprofile cpu.out
30 go tool pprof -lines *.test cpu.out
31
32 edit:
33 @ 1>/dev/null 2>/dev/null gvim -p Makefile go.mod builder.json *.go &
34
35 editor:
36 gofmt -l -s -w *.go
37
38 build_all_targets:
39 GOOS=darwin GOARCH=amd64 go build
40 GOOS=darwin GOARCH=amd64 staticcheck
41 GOOS=darwin GOARCH=arm64 go build
42 GOOS=darwin GOARCH=arm64 staticcheck
43 GOOS=freebsd GOARCH=386 go build
44 GOOS=freebsd GOARCH=386 staticcheck
45 GOOS=freebsd GOARCH=amd64 go build
46 GOOS=freebsd GOARCH=amd64 staticcheck
47 GOOS=freebsd GOARCH=arm go build
48 GOOS=freebsd GOARCH=arm staticcheck
49 GOOS=freebsd GOARCH=arm64 go build
50 GOOS=freebsd GOARCH=arm64 staticcheck
51 GOOS=illumos GOARCH=amd64 go build
52 GOOS=illumos GOARCH=amd64 staticcheck
53 GOOS=linux GOARCH=386 go build
54 GOOS=linux GOARCH=386 staticcheck
55 GOOS=linux GOARCH=amd64 go build
56 GOOS=linux GOARCH=amd64 staticcheck
57 GOOS=linux GOARCH=arm go build
58 GOOS=linux GOARCH=arm staticcheck
59 GOOS=linux GOARCH=arm64 go build
60 GOOS=linux GOARCH=arm64 staticcheck
61 GOOS=linux GOARCH=loong64 go build
62 GOOS=linux GOARCH=loong64 staticcheck
63 GOOS=linux GOARCH=mips go build
64 GOOS=linux GOARCH=mips staticcheck
65 GOOS=linux GOARCH=mips64le go build
66 GOOS=linux GOARCH=mips64le staticcheck
67 GOOS=linux GOARCH=mipsle go build
68 GOOS=linux GOARCH=mipsle staticcheck
69 GOOS=linux GOARCH=ppc64le go build
70 GOOS=linux GOARCH=ppc64le staticcheck
71 GOOS=linux GOARCH=riscv64 go build
72 GOOS=linux GOARCH=riscv64 staticcheck
73 GOOS=linux GOARCH=s390x go build
74 GOOS=linux GOARCH=s390x staticcheck
75 GOOS=netbsd GOARCH=386 go build
76 GOOS=netbsd GOARCH=386 staticcheck
77 GOOS=netbsd GOARCH=amd64 go build
78 GOOS=netbsd GOARCH=amd64 staticcheck
79 GOOS=netbsd GOARCH=arm go build
80 GOOS=netbsd GOARCH=arm staticcheck
81 GOOS=openbsd GOARCH=386 go build
82 GOOS=openbsd GOARCH=386 staticcheck
83 GOOS=openbsd GOARCH=amd64 go build
84 GOOS=openbsd GOARCH=amd64 staticcheck
85 GOOS=openbsd GOARCH=arm64 go build
86 GOOS=openbsd GOARCH=arm64 staticcheck
87 GOOS=windows GOARCH=386 go build
88 GOOS=windows GOARCH=386 staticcheck
89 GOOS=windows GOARCH=amd64 go build
90 GOOS=windows GOARCH=amd64 staticcheck
91 GOOS=windows GOARCH=arm64 go build
92 GOOS=windows GOARCH=arm64 staticcheck
93
94 internalError:
95 egrep -ho '"internal error.*"' *.go | sort | cat -n
96
97 later:
98 @grep -n $(grep) LATER * || true
99 @grep -n $(grep) MAYBE * || true
100
101 mem: clean
102 go test -run @ -bench . -memprofile mem.out -memprofilerate 1 -timeout 24h
103 go tool pprof -lines -web -alloc_space *.test mem.out
104
105 nuke: clean
106 go clean -i
107
108 todo:
109 @grep -nr $(grep) ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* * | grep -v $(ngrep) || true
110 @grep -nr $(grep) TODO * | grep -v $(ngrep) || true
111 @grep -nr $(grep) BUG * | grep -v $(ngrep) || true
112 @grep -nr $(grep) [^[:alpha:]]println * | grep -v $(ngrep) || true