From e157c1d0e76326b8e5eef6b7b5e40749ec8aaa18 Mon Sep 17 00:00:00 2001 From: morph027 Date: Sat, 3 Jul 2021 14:47:11 +0200 Subject: [PATCH] adjust easyjson for multiarch builds Signed-off-by: morph027 --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1086a77..9b05ba4 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,12 @@ ifneq ($(COUNT),) TESTARGS := $(TESTARGS) -count $(COUNT) endif +ifeq ($(GOARCH), amd64) +VENDORBIN := $(CURDIR)/vendor/bin +else +VENDORBIN := $(CURDIR)/vendor/bin/$(GOOS)_$(GOARCH) +endif + hook: [ ! -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 %_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: \ api_signaling_easyjson.go \