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 --- Makefile | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7f0b91d..049a547 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,27 @@ VERSION = $(shell git describe --tags) BUILDTIME = $(shell date +%Y.%m.%d_%H%M) -simple: build - make -C example clean simpleMutexGlobal goimports vet - make -C example clean simpleMutexProtoc goimports vet +simple: test + # make -C example clean simpleMutexGlobal goimports vet + # make -C example clean simpleMutexProtoc goimports vet # make -C example deleteproto full: install clean auto goimports vet build test install @echo everything worked and the example ran -test: goimports build test + +# if this passes, it should be OK to 'go install' +test: + reset + make goimports vet build + make -C example testGlobal + make -C example testProtoc + +dryrun: build + make -C example dryrun + +dryrun-clean: clean auto build + make -C example dryrun vet: @GO111MODULE=off go vet @@ -31,7 +43,7 @@ build: goimports bak: mv -f autogenpb autogenpb.last -install: +install: test GO111MODULE=off go install \ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" @@ -40,12 +52,6 @@ auto: autogenpb --proto file.proto --package main # rm -f auto.sort.pb.go auto.newsort.pb.go # auto.marshal.pb.go -test: - make -C example rawproto - # The Go Protocol Buffers library embeds a sync.Mutex within the MessageState struct to prevent unintended shallow copies of message structs - # It only fails in Marshal() functions though. That is dumb. - make -C example modproto # THIS DOES NOT WORK. It could work however. This autogenerated code could be used to debug it. - junk: cd example; rm -f go.* *.pb.go cd example; ../autogenpb --proto file.proto --package yellow -- cgit v1.2.3