Skip to content

Commit

Permalink
chore: support $(GO_BIN) in make install / build
Browse files Browse the repository at this point in the history
  • Loading branch information
pirtleshell committed Aug 9, 2023
1 parent cb9e3da commit 64964fc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -175,16 +177,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
Expand Down

0 comments on commit 64964fc

Please sign in to comment.