Makefile OS compatibility update
This commit is contained in:
parent
c7b3efdd02
commit
02327e13b6
34
Makefile
34
Makefile
|
@ -1,11 +1,9 @@
|
||||||
PACKAGES_NOSIMULATION=$(shell go list ./... | grep -v '/simulation')
|
PACKAGES_NOSIMULATION=$(shell go list ./... | grep -v '/simulation')
|
||||||
PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation')
|
PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation')
|
||||||
VERSION := $(shell git describe --tags --long | sed 's/v\(.*\)/\1/')
|
VERSION := $(subst v,,$(shell git describe --tags --long))
|
||||||
BUILD_TAGS = netgo ledger
|
BUILD_TAGS = netgo
|
||||||
BUILD_FLAGS = -tags "${BUILD_TAGS}" -ldflags "-X github.com/cosmos/cosmos-sdk/version.Version=${VERSION}"
|
BUILD_FLAGS = -tags "${BUILD_TAGS}" -ldflags "-X github.com/cosmos/cosmos-sdk/version.Version=${VERSION}"
|
||||||
GCC := $(shell command -v gcc 2> /dev/null)
|
|
||||||
LEDGER_ENABLED ?= true
|
LEDGER_ENABLED ?= true
|
||||||
UNAME_S := $(shell uname -s)
|
|
||||||
GOTOOLS = \
|
GOTOOLS = \
|
||||||
github.com/golang/dep/cmd/dep \
|
github.com/golang/dep/cmd/dep \
|
||||||
github.com/alecthomas/gometalinter \
|
github.com/alecthomas/gometalinter \
|
||||||
|
@ -20,23 +18,31 @@ ci: get_tools get_vendor_deps install test_cover test_lint test
|
||||||
########################################
|
########################################
|
||||||
### Build/Install
|
### Build/Install
|
||||||
|
|
||||||
check-ledger:
|
# Add ledger support - Makefile variable changes are out of a target's scope. There is no point in putting this into a target.
|
||||||
ifeq ($(LEDGER_ENABLED),true)
|
ifeq ($(LEDGER_ENABLED),true)
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
GCCEXE = $(shell where gcc.exe 2> NUL)
|
||||||
|
ifeq ($(GCCEXE),)
|
||||||
|
$(error gcc.exe not installed for ledger support, please install or set LEDGER_ENABLED=false)
|
||||||
|
else
|
||||||
|
BUILD_TAGS += ledger
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
UNAME_S = $(shell uname -s)
|
||||||
ifeq ($(UNAME_S),OpenBSD)
|
ifeq ($(UNAME_S),OpenBSD)
|
||||||
$(info "OpenBSD detected, disabling ledger support (https://github.com/cosmos/cosmos-sdk/issues/1988)")
|
$(warning OpenBSD detected, disabling ledger support (https://github.com/cosmos/cosmos-sdk/issues/1988))
|
||||||
TMP_BUILD_TAGS := $(BUILD_TAGS)
|
|
||||||
BUILD_TAGS = $(filter-out ledger, $(TMP_BUILD_TAGS))
|
|
||||||
else
|
else
|
||||||
ifndef GCC
|
GCC = $(shell command -v gcc 2> /dev/null)
|
||||||
$(error "gcc not installed for ledger support, please install or set LEDGER_ENABLED to false in the Makefile")
|
ifeq ($(GCC),)
|
||||||
|
$(error gcc not installed for ledger support, please install or set LEDGER_ENABLED=false)
|
||||||
|
else
|
||||||
|
BUILD_TAGS += ledger
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
|
||||||
TMP_BUILD_TAGS := $(BUILD_TAGS)
|
|
||||||
BUILD_TAGS = $(filter-out ledger, $(TMP_BUILD_TAGS))
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
build: check-ledger update_gaia_lite_docs
|
build:
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
go build $(BUILD_FLAGS) -o build/gaiad.exe ./cmd/gaia/cmd/gaiad
|
go build $(BUILD_FLAGS) -o build/gaiad.exe ./cmd/gaia/cmd/gaiad
|
||||||
go build $(BUILD_FLAGS) -o build/gaiacli.exe ./cmd/gaia/cmd/gaiacli
|
go build $(BUILD_FLAGS) -o build/gaiacli.exe ./cmd/gaia/cmd/gaiacli
|
||||||
|
|
|
@ -41,6 +41,7 @@ IMPROVEMENTS
|
||||||
|
|
||||||
* Gaia
|
* Gaia
|
||||||
- #2637 [x/gov] Switched inactive and active proposal queues to an iterator based queue
|
- #2637 [x/gov] Switched inactive and active proposal queues to an iterator based queue
|
||||||
|
- #2672 [Makefile] Updated for better Windows compatibility and ledger support logic
|
||||||
|
|
||||||
* SDK
|
* SDK
|
||||||
- \#2573 [x/distribution] add accum invariance
|
- \#2573 [x/distribution] add accum invariance
|
||||||
|
|
Loading…
Reference in New Issue