* make pb

* Makefile for pb

Move the Makefile into the pb directory to remove some clutter from the
main Makefile.
This commit is contained in:
Miek Gieben
2018-05-05 18:01:17 +02:00
committed by John Belamaric
parent bf479f9ac2
commit 41f1a1434a
2 changed files with 15 additions and 0 deletions

View File

@@ -78,6 +78,10 @@ core/zplugin.go core/dnsserver/zdirectives.go: plugin.cfg
gen:
go generate coredns.go
.PHONY: pb
pb:
$(MAKE) -C pb
.PHONY: linter
linter:
go get -u github.com/alecthomas/gometalinter

11
pb/Makefile Normal file
View File

@@ -0,0 +1,11 @@
# Generate the Go files from the dns.proto protobuf, you need the utilities
# from: https://github.com/golang/protobuf to make this work.
# The generate dns.pb.go is checked into git, so for normal builds we don't need
# to run this generation step.
all: dns.pb.go
dns.pb.go: dns.proto
protoc --go_out=plugins=grpc:. dns.proto && \
sed -e s?golang.org/x/net/context?context? < dns.pb.go > dns.pb.go.tmp && \
mv dns.pb.go.tmp dns.pb.go