From abbd150c1c61e47913c3816979445fee09a8914d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 9 Oct 2025 01:06:02 -0500 Subject: common protobuf makefile --- Makefile | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index f3be7c5..15b11eb 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ -redo: generate goimport vet +all: toolkitConfig.pb.go goimports vet + @echo This GO code passes the compile checks + +toolkitConfig.pb.go: toolkitConfig.proto + make generate generate: clean go mod init @@ -8,26 +12,21 @@ generate: clean go-generate: rm -f *.pb.go *.patch -vet: - @GO111MODULE=off go vet - -vet: - @GO111MODULE=off go vet - @echo this go library builds okay - -redomod: goimports - rm -f go.* - GO111MODULE= go mod init - GO111MODULE= go mod tidy - goimports: goimports -w *.go -proto: toolkitConfig.pb.go - -toolkitConfig.pb.go: toolkitConfig.proto - autogenpb --proto toolkitConfig.proto +vet: + @GO111MODULE=off go vet clean: - rm -f go.* *.pb.go + rm -f *.pb.go *.patch + -rm -f go.* go-mod-clean purge + +# fixes your numbers if you move things around +# THIS TOTALLY BREAKS THE POINT OF PROTOBUF +# To work around that breaking, you must change the version +# also, all the wrapping code must support this. which it doesn't +proto-renumber: clean + autogenpb --renumber --proto toolkitConfig.proto + make goimports vet -- cgit v1.2.3