2025-01-08 19:58:29 -06:00
|
|
|
VERSION = $(shell git describe --tags)
|
|
|
|
BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
|
|
|
|
|
2025-01-11 02:44:21 -06:00
|
|
|
all: clean simpleMutexProtoc goimports build
|
2025-01-09 17:15:53 -06:00
|
|
|
./example
|
|
|
|
|
2025-01-12 01:32:52 -06:00
|
|
|
# if this passes, then autogenpb should be working
|
|
|
|
# and it is OK to 'go install' the binary
|
|
|
|
test: testGlobal testProtoc
|
|
|
|
|
2025-01-12 09:28:58 -06:00
|
|
|
toy:
|
|
|
|
../autogenpb --proto toy.proto --package main
|
|
|
|
|
2025-01-12 01:32:52 -06:00
|
|
|
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
|
|
|
|
|
2025-01-12 06:13:42 -06:00
|
|
|
help:
|
|
|
|
../autogenpb --package main --proto bad.proto
|
|
|
|
|
2025-01-09 16:02:53 -06:00
|
|
|
modproto: clean withMutex goimports vet build
|
|
|
|
./example
|
|
|
|
|
|
|
|
rawproto: clean withoutMutex goimports vet build
|
2025-01-09 15:29:27 -06:00
|
|
|
./example
|
2025-01-08 19:58:29 -06:00
|
|
|
|
2025-01-11 03:42:14 -06:00
|
|
|
deleteproto: clean
|
|
|
|
../autogenpb --proto fruit.proto --package main --delete
|
|
|
|
make build
|
|
|
|
|
2025-01-08 19:58:29 -06:00
|
|
|
vet:
|
|
|
|
@GO111MODULE=off go vet
|
|
|
|
|
2025-01-11 03:42:14 -06:00
|
|
|
rawbuild:
|
|
|
|
GO111MODULE=off go build -v
|
|
|
|
|
|
|
|
build: goimports vet
|
2025-01-09 20:08:22 -06:00
|
|
|
GO111MODULE=off go build -v
|
2025-01-08 19:58:29 -06:00
|
|
|
|
2025-01-11 03:42:14 -06:00
|
|
|
simpleMutexProtoc: clean
|
2025-01-10 11:22:08 -06:00
|
|
|
../autogenpb --proto fruit.proto --package main
|
|
|
|
|
2025-01-10 18:26:44 -06:00
|
|
|
# why does this fail to compile? I'm not sure. maybe someone smart can figure it out
|
|
|
|
# basically, it just trys to return the deleted record but says something
|
|
|
|
# about the RWmutex lock being copied and GO fails to compile
|
|
|
|
# I'm don't grok what is going on. This autogenerated code should
|
|
|
|
# provide as simple as one could hope for automated way to try to debug it though!
|
2025-01-11 03:42:14 -06:00
|
|
|
simpleMutexProtocWithDeleteCopy: clean
|
2025-01-10 18:26:44 -06:00
|
|
|
../autogenpb --proto fruit.proto --package main --delete
|
|
|
|
|
2025-01-11 03:42:14 -06:00
|
|
|
simpleMutexGlobal: clean
|
2025-01-10 17:49:14 -06:00
|
|
|
../autogenpb --proto fruit.proto --package main --mutex=false
|
|
|
|
|
2025-01-11 03:42:14 -06:00
|
|
|
withMutex: clean
|
2025-01-10 07:40:24 -06:00
|
|
|
../autogenpb --proto fruit.proto --package main
|
|
|
|
../autogenpb --proto file.proto --package main
|
2025-01-10 11:22:08 -06:00
|
|
|
../autogenpb --proto patchset.proto --package main
|
2025-01-08 19:58:29 -06:00
|
|
|
|
2025-01-11 03:42:14 -06:00
|
|
|
withoutMutex: clean
|
2025-01-10 07:40:24 -06:00
|
|
|
../autogenpb --proto fruit.proto --package main --mutex=false
|
|
|
|
../autogenpb --proto file.proto --package main --mutex=false
|
2025-01-10 11:22:08 -06:00
|
|
|
../autogenpb --proto patchset.proto --package main --mutex=false
|
2025-01-09 16:02:53 -06:00
|
|
|
|
2025-01-12 01:32:52 -06:00
|
|
|
dryrun:
|
|
|
|
../autogenpb --proto fruit.proto --package main --dry-run
|
|
|
|
# ../autogenpb --proto file.proto --package main
|
|
|
|
|
2025-01-08 19:58:29 -06:00
|
|
|
goimports:
|
|
|
|
goimports -w *.go
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f go.*
|
|
|
|
-rm -f *.pb.go
|
2025-01-11 03:13:20 -06:00
|
|
|
-rm -f example
|