forked from cznic/ql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
67 lines (51 loc) · 1.35 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
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
.PHONY: all clean nuke
all: editor scanner.go parser.go coerce.go
go build
go vet
go install
golint .
make todo
bench: all
go test -run NONE -bench .
check: ql.y
go tool yacc -v /dev/null -o /dev/null $<
clean:
go clean
rm -f *~ y.output y.go y.tab.c *.out ql.test
coerce.go: helper.go
if [ -f coerce.go ] ; then rm coerce.go ; fi
go run helper.go -o $@
cover:
t=$(shell tempfile) ; go test -coverprofile $$t && go tool cover -html $$t && unlink $$t
editor: check scanner.go parser.go
go fmt
go test -i
go test
go install
cpu: ql.test
go test -c
./$< -test.bench . -test.cpuprofile cpu.out
go tool pprof $< cpu.out
mem: ql.test
go test -c
./$< -test.bench . -test.memprofile mem.out
go tool pprof $< mem.out
nuke:
go clean -i
parser.go: parser.y
go tool yacc -o $@ -v /dev/null $<
sed -i -e 's|//line.*||' -e 's/yyEofCode/yyEOFCode/' $@
ql.test: all
ql.y: doc.go
sed -n '1,/^package/ s/^\/\/ //p' < $< \
| ebnf2y -o $@ -oe $*.ebnf -start StatementList -pkg $* -p _
scanner.go: scanner.l parser.go
golex -o $@ $<
todo:
@grep -n ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* *.go *.l parser.y || true
@grep -n TODO *.go *.l parser.y || true
@grep -n BUG *.go *.l parser.y || true
@grep -n println *.go *.l parser.y || true
later:
@grep -n LATER *.go *.l parser.y || true
@grep -n MAYBE *.go *.l parser.y || true