Makefile 957 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. all: test testrace
  2. deps:
  3. go get -d -v google.golang.org/grpc/...
  4. updatedeps:
  5. go get -d -v -u -f google.golang.org/grpc/...
  6. testdeps:
  7. go get -d -v -t google.golang.org/grpc/...
  8. updatetestdeps:
  9. go get -d -v -t -u -f google.golang.org/grpc/...
  10. build: deps
  11. go build google.golang.org/grpc/...
  12. proto:
  13. @ if ! which protoc > /dev/null; then \
  14. echo "error: protoc not installed" >&2; \
  15. exit 1; \
  16. fi
  17. go get -u -v github.com/golang/protobuf/protoc-gen-go
  18. for file in $$(git ls-files '*.proto'); do \
  19. protoc -I $$(dirname $$file) --go_out=plugins=grpc:$$(dirname $$file) $$file; \
  20. done
  21. test: testdeps
  22. go test -v -cpu 1,4 google.golang.org/grpc/...
  23. testrace: testdeps
  24. go test -v -race -cpu 1,4 google.golang.org/grpc/...
  25. clean:
  26. go clean -i google.golang.org/grpc/...
  27. coverage: testdeps
  28. ./coverage.sh --coveralls
  29. .PHONY: \
  30. all \
  31. deps \
  32. updatedeps \
  33. testdeps \
  34. updatetestdeps \
  35. build \
  36. proto \
  37. test \
  38. testrace \
  39. clean \
  40. coverage