mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 08:15:19 +00:00
chore: support $(GO_BIN) in make install / build
This commit is contained in:
parent
2eee058b78
commit
48c845b941
8
Makefile
8
Makefile
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user