summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-09 01:04:34 -0500
committerJeff Carr <[email protected]>2025-10-09 01:04:34 -0500
commit8d1e4087074460e053b89d51a4cac674ce35bbe9 (patch)
treef6add3fc0023aa91bbcffafa57047a8cd8d16579 /Makefile
parente85a40c7bf00e12400b9aac8d783f5daf1cd3bdf (diff)
common protobuf makefilev0.0.157
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile66
1 files changed, 9 insertions, 57 deletions
diff --git a/Makefile b/Makefile
index 2bfbfeb..dcba6f2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,8 @@
-# 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: repo.pb.go goimports vet
+ @echo This GO code passes the compile checks
-
-all: gitTag.pb.go goDep.pb.go repo.pb.go goimports vet
+repo.pb.go: repo.proto
+ make generate
generate: clean
go mod init
@@ -15,58 +12,13 @@ generate: clean
go-generate:
rm -f *.pb.go *.patch
-vet:
- @GO111MODULE=off go vet
- @echo this go library package builds okay
-
-# autofixes your import headers in your golang files
goimports:
goimports -w *.go
-# dump autogenerated files and potential patches
+vet:
+ @GO111MODULE=off go vet
+
clean:
- rm -f *.pb.go go.* *.patch
+ rm -f *.pb.go *.patch
+ -rm -f go.*
go-mod-clean purge
-
-#refs.pb.go: refs.proto
-# cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \
-# --go_opt=Mrefs.proto=go.wit.com/lib/protobuf/gitpb \
-# refs.proto
-
-gitTag.pb.go: gitTag.proto
- autogenpb --proto gitTag.proto --mutex-name "john"
-
-goDep.pb.go: goDep.proto
- autogenpb --proto goDep.proto
-
-repo.pb.go: repo.proto
- autogenpb --proto repo.proto
-
-protoc-bad:
- cd ~/go/src && protoc \
- --proto_path=. \
- --proto_path=go.wit.com/lib/protobuf/gitpb \
- --go_out=. \
- --go_opt=Mgo.wit.com/lib/protobuf/gitpb/repo.proto=go.wit.com/lib/protobuf/gitpb \
- --go_opt=MgitTag.proto=go.wit.com/lib/protobuf/gitpb \
- --go_opt=MgoDep.proto=go.wit.com/lib/protobuf/gitpb \
- go.wit.com/lib/protobuf/gitpb/repo.proto
-
-protoc-good:
- cd ~/go/src && protoc \
- --proto_path=. \
- --go_out=go.wit.com/lib/protobuf/gitpb \
- --go_opt=Mrepo.proto=go.wit.com/lib/protobuf/gitpb \
- --go_opt=MgitTag.proto=go.wit.com/lib/protobuf/gitpb \
- --go_opt=MgoDep.proto=go.wit.com/lib/protobuf/gitpb \
- go.wit.com/lib/protobuf/gitpb/repo.proto
-
-protoc-todo-move-to-this:
- # I think I should seperate these dirs. ONLY ONE .proto FILE PER DIRECTORY
- # - httppb.HttpRequest httpRequest = 4; // correct syntax
- 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