-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (43 loc) · 1.3 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
build-all: build build-v3
build: generate
@go build ./...
build-v3:
@make -C v3 build
test-all: test test-v3
test:
@go test ./...
test-v3:
@make -C v3 test
test-cover-all: test-cover test-cover-v3
test-cover:
@go test -coverprofile=c.out ./...
@-rm c.out
test-cover-v3:
@make -C v3 test-cover
install:
@go install ./cmd/...
install-v3:
@make -C v3 install
generate:
@go install ./cmd/protocol-gen
@go generate .
generate-v3:
@make -C v3 generate
clean:
@rm $$(go env GOPATH)/bin/protocol-gen
@go clean ./...
clean-v3:
@make -C v3 clean
help:
@echo "targets:"
@echo " build-all build all versions of the code"
@echo " build build the code"
@echo " test-all test all versions of the code"
@echo " test run unit tests"
@echo " test-cover-all test coverage for all versions of the code"
@echo " test-cover run unit tests with test coverage"
@echo " install compile and install projects in the cmd directory"
@echo " generate install the code generator under \$$GOPATH/bin and generate code using the default relative paths"
@echo " clean remove the installed protocol generator and clean any build files"
@echo ""
@echo "append '-v3' to a target to do it for version 3"