make: Setup PATH to include path to go binary when running easyjson.

This commit is contained in:
Joachim Bauch 2022-04-05 11:29:56 +02:00
parent 5fc886913c
commit 72965533b9
No known key found for this signature in database
GPG key ID: 77C1D22D53E15F02

View file

@ -2,7 +2,8 @@ all: build
GO := $(shell which go)
GOPATH := $(shell "$(GO)" env GOPATH)
GOFMT := "$(shell dirname "$(GO)")/gofmt"
GODIR := $(shell dirname "$(GO)")
GOFMT := "$(GODIR)/gofmt"
GOOS ?= linux
GOARCH ?= amd64
GOVERSION := $(shell "$(GO)" env GOVERSION | sed "s|go||" )
@ -91,7 +92,7 @@ coverhtml: vet common
$(GO) tool cover -html=cover.out -o coverage.html
%_easyjson.go: %.go $(GOPATHBIN)/bin/easyjson
"$(GOPATHBIN)/easyjson" -all $*.go
PATH="$(GODIR)":$(PATH) "$(GOPATHBIN)/easyjson" -all $*.go
common: \
api_signaling_easyjson.go \