use go generate instead of make for protoc
This commit is contained in:
parent
a1fa0d8fe5
commit
b263706342
14
Makefile
14
Makefile
@ -1,2 +1,12 @@
|
||||
mfer/app.pb.go: mf.proto
|
||||
protoc --go_out=./mfer $<
|
||||
PROTOC_GEN_GO := $(GOPATH)/bin/protoc-gen-go
|
||||
|
||||
default: compile
|
||||
|
||||
$(PROTOC_GEN_GO):
|
||||
go get -u github.com/golang/protobuf/protoc-gen-go
|
||||
|
||||
compile: $(PROTOC_GEN_GO)
|
||||
cd proto && go generate .
|
||||
|
||||
clean:
|
||||
rm -rfv proto/*.pb.go
|
||||
|
3
proto/gen.go
Normal file
3
proto/gen.go
Normal file
@ -0,0 +1,3 @@
|
||||
package proto
|
||||
|
||||
//go:generate protoc --go_out=. mf.proto
|
Loading…
Reference in New Issue
Block a user