-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (32 loc) · 879 Bytes
/
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
.PHONY: test
test: fmt testdata/innings.sqlite3 saved_queries.go
@go test .
.PHONY: release
release: release/data/innings.sqlite3 release/cricket-query
.PHONY: clean
clean: clean-db clean-binary
.PHONY: clean-db
clean-db:
rm -f release/data/innings.sqlite3
.PHONY: clean-binary
clean-binary:
rm -f release/cricket-query
.PHONY: run
run: fmt data/innings.sqlite3 saved_queries.go
@go run .
.PHONY: fmt
fmt:
@go fmt
saved_queries.go: saved-queries/*.txt scripts/create-saved-queries
scripts/create-saved-queries
data/innings.sqlite3: data/*.csv scripts/create-db
scripts/create-db data
release/data/innings.sqlite3: data/innings.sqlite3
make clean-db
mkdir -p release/data
cp data/innings.sqlite3 release/data
release/cricket-query: *.go
go build -o release/cricket-query
testdata/innings.sqlite3: scripts/create-db
scripts/create-db testdata
-include *.mk