*: add gRPC to build system

This commit is contained in:
Eric Chiang
2016-07-31 23:26:05 -07:00
parent 94e26782b4
commit a28d22ff0c
2 changed files with 40 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
PROJ="poke"
ORG_PATH="github.com/coreos"
REPO_PATH="$(ORG_PATH)/$(PROJ)"
export PATH := $(PWD)/bin:$(PATH)
export GOBIN=$(PWD)/bin
export GO15VENDOREXPERIMENT=1
@@ -41,15 +42,22 @@ fmt:
@go fmt $(shell go list ./... | grep -v '/vendor/')
lint:
@for package in $(shell go list ./... | grep -v '/vendor/'); do \
@for package in $(shell go list ./... | grep -v '/vendor/' | grep -v 'api/apipb'); do \
golint $$package; \
done
# TODO(ericchiang): Grab protoc as well.
grpc: bin/protoc-gen-go
@protoc --go_out=plugins=grpc:. ./api/apipb/*.proto
bin/protoc-gen-go:
@go install ${REPO_PATH}/vendor/github.com/golang/protobuf/protoc-gen-go
clean:
rm bin/poke bin/pokectl
@rm bin/*
testall: testrace vet fmt lint
FORCE:
.PHONY: test testrace vet fmt lint testall
.PHONY: test testrace vet fmt lint testall grpc