blob: 03bb01f0b35ba4ea2eff18970acc243df12c46c2 [file] [log] [blame]
Quentin Smith4fdefc02017-02-08 11:30:54 -05001all: test testrace
2
3deps:
4 go get -d -v google.golang.org/grpc/...
5
6updatedeps:
7 go get -d -v -u -f google.golang.org/grpc/...
8
9testdeps:
10 go get -d -v -t google.golang.org/grpc/...
11
12updatetestdeps:
13 go get -d -v -t -u -f google.golang.org/grpc/...
14
15build: deps
16 go build google.golang.org/grpc/...
17
18proto:
19 @ if ! which protoc > /dev/null; then \
20 echo "error: protoc not installed" >&2; \
21 exit 1; \
22 fi
23 go get -u -v github.com/golang/protobuf/protoc-gen-go
24 # use $$dir as the root for all proto files in the same directory
25 for dir in $$(git ls-files '*.proto' | xargs -n1 dirname | uniq); do \
26 protoc -I $$dir --go_out=plugins=grpc:$$dir $$dir/*.proto; \
27 done
28
29test: testdeps
30 go test -v -cpu 1,4 google.golang.org/grpc/...
31
32testrace: testdeps
33 go test -v -race -cpu 1,4 google.golang.org/grpc/...
34
35clean:
36 go clean -i google.golang.org/grpc/...
37
38coverage: testdeps
39 ./coverage.sh --coveralls
40
41.PHONY: \
42 all \
43 deps \
44 updatedeps \
45 testdeps \
46 updatetestdeps \
47 build \
48 proto \
49 test \
50 testrace \
51 clean \
52 coverage