source: code/trunk/vendor/modernc.org/token/Makefile@ 822

Last change on this file since 822 was 822, checked in by yakumo.izuru, 22 months ago

Prefer immortal.run over runit and rc.d, use vendored modules
for convenience.

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 1.3 KB
Line 
1.PHONY: all clean cover cpu editor internalError later mem nuke todo edit
2
3grep=--include=*.go --include=*.l --include=*.y --include=*.yy
4ngrep='TODOOK\|parser\.go\|scanner\.go\|.*_string\.go'
5
6all: editor
7 go vet 2>&1 | grep -v $(ngrep) || true
8 golint 2>&1 | grep -v $(ngrep) || true
9 make todo
10 unused . || true
11 misspell *.go
12 gosimple || true
13 maligned || true
14 unconvert -apply
15
16clean:
17 go clean
18 rm -f *~ *.test *.out
19
20cover:
21 t=$(shell mktemp) ; go test -coverprofile $$t && go tool cover -html $$t && unlink $$t
22
23cpu: clean
24 go test -run @ -bench . -cpuprofile cpu.out
25 go tool pprof -lines *.test cpu.out
26
27edit:
28 gvim -p Makefile *.go
29
30editor:
31 gofmt -l -s -w *.go
32 go test -i
33 go test 2>&1 | tee log
34 go install
35
36internalError:
37 egrep -ho '"internal error.*"' *.go | sort | cat -n
38
39later:
40 @grep -n $(grep) LATER * || true
41 @grep -n $(grep) MAYBE * || true
42
43mem: clean
44 go test -run @ -bench . -memprofile mem.out -memprofilerate 1 -timeout 24h
45 go tool pprof -lines -web -alloc_space *.test mem.out
46
47nuke: clean
48 go clean -i
49
50todo:
51 @grep -nr $(grep) ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* * | grep -v $(ngrep) || true
52 @grep -nr $(grep) TODO * | grep -v $(ngrep) || true
53 @grep -nr $(grep) BUG * | grep -v $(ngrep) || true
54 @grep -nr $(grep) [^[:alpha:]]println * | grep -v $(ngrep) || true
Note: See TracBrowser for help on using the repository browser.