aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-05-05 18:01:17 +0200
committerGravatar John Belamaric <jbelamaric@infoblox.com> 2018-05-05 12:01:17 -0400
commit41f1a1434ace180f955317d1d8965a8644c6aa31 (patch)
tree5d1927d7419ccdd686810173aabd15db8a29a721
parentbf479f9ac2d72c205580e318270211aadafc7d11 (diff)
downloadcoredns-41f1a1434ace180f955317d1d8965a8644c6aa31.tar.gz
coredns-41f1a1434ace180f955317d1d8965a8644c6aa31.tar.zst
coredns-41f1a1434ace180f955317d1d8965a8644c6aa31.zip
Pr 1770 (#1771)
* make pb * Makefile for pb Move the Makefile into the pb directory to remove some clutter from the main Makefile.
-rw-r--r--Makefile4
-rw-r--r--pb/Makefile11
2 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 998b88d60..3b9452887 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/pb/Makefile b/pb/Makefile
new file mode 100644
index 000000000..bdfc8e3b0
--- /dev/null
+++ b/pb/Makefile
@@ -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