adjust easyjson for multiarch builds

Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
This commit is contained in:
morph027 2021-07-03 14:47:11 +02:00
parent 2662d49017
commit e157c1d0e7
No known key found for this signature in database
GPG Key ID: BF17A54BB873BE58
1 changed files with 7 additions and 1 deletions

View File

@ -37,6 +37,12 @@ ifneq ($(COUNT),)
TESTARGS := $(TESTARGS) -count $(COUNT) TESTARGS := $(TESTARGS) -count $(COUNT)
endif endif
ifeq ($(GOARCH), amd64)
VENDORBIN := $(CURDIR)/vendor/bin
else
VENDORBIN := $(CURDIR)/vendor/bin/$(GOOS)_$(GOARCH)
endif
hook: hook:
[ ! -d "$(CURDIR)/.git/hooks" ] || ln -sf "$(CURDIR)/scripts/pre-commit.hook" "$(CURDIR)/.git/hooks/pre-commit" [ ! -d "$(CURDIR)/.git/hooks" ] || ln -sf "$(CURDIR)/scripts/pre-commit.hook" "$(CURDIR)/.git/hooks/pre-commit"
@ -79,7 +85,7 @@ coverhtml: vet common
GOPATH=$(GOPATH) $(GO) tool cover -html=cover.out -o coverage.html GOPATH=$(GOPATH) $(GO) tool cover -html=cover.out -o coverage.html
%_easyjson.go: %.go ./vendor/bin/easyjson %_easyjson.go: %.go ./vendor/bin/easyjson
PATH=$(shell dirname $(GO)):$(PATH) GOPATH=$(GOPATH) ./vendor/bin/easyjson -all $*.go PATH=$(shell dirname $(GO)):$(PATH) GOPATH=$(GOPATH) "$(VENDORBIN)/easyjson" -all $*.go
common: \ common: \
api_signaling_easyjson.go \ api_signaling_easyjson.go \