chore: support $(GO_BIN) in make install / build

This commit is contained in:
Robert Pirtle 2023-08-09 16:07:47 -07:00
parent 2eee058b78
commit 48c845b941

View File

@ -3,6 +3,8 @@
################################################################################
PROJECT_NAME := kava# unique namespace for project
GO_BIN ?= go
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
GIT_COMMIT := $(shell git rev-parse HEAD)
GIT_COMMIT_SHORT := $(shell git rev-parse --short HEAD)
@ -186,16 +188,16 @@ all: install
build: go.sum
ifeq ($(OS), Windows_NT)
go build -mod=readonly $(BUILD_FLAGS) -o out/$(shell go env GOOS)/kava.exe ./cmd/kava
$(GO_BIN) build -mod=readonly $(BUILD_FLAGS) -o out/$(shell $(GO_BIN) env GOOS)/kava.exe ./cmd/kava
else
go build -mod=readonly $(BUILD_FLAGS) -o out/$(shell go env GOOS)/kava ./cmd/kava
$(GO_BIN) build -mod=readonly $(BUILD_FLAGS) -o out/$(shell $(GO_BIN) env GOOS)/kava ./cmd/kava
endif
build-linux: go.sum
LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build
install: go.sum
go install -mod=readonly $(BUILD_FLAGS) ./cmd/kava
$(GO_BIN) install -mod=readonly $(BUILD_FLAGS) ./cmd/kava
########################################
### Tools & dependencies