From cfd9ec5ccddded628f4f9bf95beefc11dcfeb51b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 12 Jan 2025 01:32:52 -0600 Subject: refactor again. I want to make this clean as clean as possible because, I use this tool alot. everywhere. I want it to always work. I need do not want it to break --- example/Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'example/Makefile') diff --git a/example/Makefile b/example/Makefile index 22a8c65..3a045bd 100644 --- a/example/Makefile +++ b/example/Makefile @@ -4,6 +4,20 @@ BUILDTIME = $(shell date +%Y.%m.%d_%H%M) all: clean simpleMutexProtoc goimports build ./example +# if this passes, then autogenpb should be working +# and it is OK to 'go install' the binary +test: testGlobal testProtoc + +testGlobal: + make clean + ../autogenpb --proto fruit.proto --package main --mutex=false # first build with a global mutex + make build + +testProtoc: + make clean + ../autogenpb --proto fruit.proto --package main # inserts mutex into protoc .pb.go file + make build + modproto: clean withMutex goimports vet build ./example @@ -47,6 +61,10 @@ withoutMutex: clean ../autogenpb --proto file.proto --package main --mutex=false ../autogenpb --proto patchset.proto --package main --mutex=false +dryrun: + ../autogenpb --proto fruit.proto --package main --dry-run + # ../autogenpb --proto file.proto --package main + goimports: goimports -w *.go -- cgit v1.2.3