use go generate instead of make for protoc

This commit is contained in:
Jeffrey Paul 2021-10-26 02:10:55 -07:00
parent a1fa0d8fe5
commit b263706342
4 changed files with 15 additions and 2 deletions

View File

@ -1,2 +1,12 @@
mfer/app.pb.go: mf.proto PROTOC_GEN_GO := $(GOPATH)/bin/protoc-gen-go
protoc --go_out=./mfer $<
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

View File

3
proto/gen.go Normal file
View File

@ -0,0 +1,3 @@
package proto
//go:generate protoc --go_out=. mf.proto