source: code/trunk/vendor/modernc.org/mathutil/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.4 KB
RevLine 
[822]1# Copyright (c) 2016 The mathutil 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
6
7grep=--include=*.go --include=*.l --include=*.y --include=*.yy
8ngrep='TODOOK\|parser\.go\|scanner\.go\|.*_string\.go'
9
10all: 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 unconvert || true
16 maligned || true
17 staticcheck || true
18
19clean:
20 go clean
21 rm -f *~ *.test *.out
22
23cover:
24 t=$(shell tempfile) ; go test -coverprofile $$t && go tool cover -html $$t && unlink $$t
25
26cpu: clean
27 go test -run @ -bench . -cpuprofile cpu.out
28 go tool pprof -lines *.test cpu.out
29
30edit:
31 @ 1>/dev/null 2>/dev/null gvim -p Makefile *.go &
32
33editor:
34 gofmt -l -s -w *.go
35 go test
36 go build
37
38internalError:
39 egrep -ho '"internal error.*"' *.go | sort | cat -n
40
41later:
42 @grep -n $(grep) LATER * || true
43 @grep -n $(grep) MAYBE * || true
44
45mem: clean
46 go test -run @ -bench . -memprofile mem.out -memprofilerate 1 -timeout 24h
47 go tool pprof -lines -web -alloc_space *.test mem.out
48
49nuke: clean
50 go clean -i
51
52todo:
53 @grep -nr $(grep) ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* * | grep -v $(ngrep) || true
54 @grep -nr $(grep) TODO * | grep -v $(ngrep) || true
55 @grep -nr $(grep) BUG * | grep -v $(ngrep) || true
56 @grep -nr $(grep) [^[:alpha:]]println * | grep -v $(ngrep) || true
Note: See TracBrowser for help on using the repository browser.