forgepb/Makefile

40 lines
991 B
Makefile

# You must use the current protoc-gen-go
#
# go-clone --go-src google.golang.org/protobuf
# cd ~/go/src/google.golang.org/protobuf/cmd/protoc-gen-go
# go install
all: forgeConfig.pb.go patchset.pb.go goimports vet
generate: clean
autogenpb --proto patchset.proto
autogenpb --proto forgeConfig.proto
vet:
@GO111MODULE=off go vet
@echo this go library package builds okay
# autofixes your import headers in your golang files
goimports:
goimports -w *.go
clean:
rm -f *.pb.go *.patch
-rm -f go.*
go-mod-clean purge
forgeConfig.pb.go: forgeConfig.proto
autogenpb --proto forgeConfig.proto
patchset.pb.go: patchset.proto
autogenpb --proto patchset.proto
protoc-test:
cd ~/go/src && protoc \
--proto_path=. \
--go_out=. \
--go_opt=Mgo.wit.com/lib/protobuf/forgepb/patchset.proto=go.wit.com/lib/protobuf/forgepb \
--go_opt=Mgo.wit.com/lib/protobuf/httppb/httpRequest.proto=go.wit.com/lib/protobuf/httppb \
go.wit.com/lib/protobuf/forgepb/patchset.proto