-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (32 loc) · 857 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
45
46
47
BINARY := wacc_34
GOGLIDE := $(GOPATH)/bin/glide
GOLINTER := $(GOPATH)/bin/gometalinter
GOPEG := $(GOPATH)/bin/peg
SRC := $(shell find . -name '*.go' -not -path '*/vendor/*')
GRM := $(shell find . -name '*.peg' -not -path '*/vendor/*')
SRC += $(patsubst %.peg,%.peg.go,$(GRM))
all: $(BINARY)
$(BINARY): $(SRC) vendor
go build
vendor: $(GOGLIDE) glide.lock
$(GOGLIDE) install
format:
go fmt
lint: $(GOLINTER)
$(GOLINTER) --exclude=vendor --exclude '.peg.go'
install: $(BINARY)
go install
test: $(BINARY)
tests/test
clean:
go clean
$(patsubst %.peg,%.peg.go,$(GRM)): $(GRM) $(GOPEG)
$(GOPEG) $(patsubst %.go,%,$@)
$(GOGLIDE):
go get -u github.com/Masterminds/glide
$(GOLINTER):
go get -u github.com/alecthomas/gometalinter
$(GOLINTER) --install
$(GOPEG):
go get -u gitlab.doc.ic.ac.uk/ss14615/peg
.PHONY: all clean lint format test