make: set default GOCC earlier
This commit is contained in:
parent
2fd12daf9f
commit
57d87ef24b
4
Makefile
4
Makefile
@ -5,6 +5,8 @@ all: build
|
|||||||
|
|
||||||
unexport GOFLAGS
|
unexport GOFLAGS
|
||||||
|
|
||||||
|
GOCC?=go
|
||||||
|
|
||||||
GOVERSION:=$(shell $(GOCC) version | tr ' ' '\n' | grep go1 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
|
GOVERSION:=$(shell $(GOCC) version | tr ' ' '\n' | grep go1 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
|
||||||
ifeq ($(shell expr $(GOVERSION) \< 1016000), 1)
|
ifeq ($(shell expr $(GOVERSION) \< 1016000), 1)
|
||||||
$(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell expr $(GOVERSION) % 1000000 / 1000).$(shell expr $(GOVERSION) % 1000))
|
$(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell expr $(GOVERSION) % 1000000 / 1000).$(shell expr $(GOVERSION) % 1000))
|
||||||
@ -17,8 +19,6 @@ MODULES:=
|
|||||||
CLEAN:=
|
CLEAN:=
|
||||||
BINS:=
|
BINS:=
|
||||||
|
|
||||||
GOCC?=go
|
|
||||||
|
|
||||||
ldflags=-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.$(subst -,.,$(shell git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || git rev-parse --short HEAD 2>/dev/null))
|
ldflags=-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.$(subst -,.,$(shell git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || git rev-parse --short HEAD 2>/dev/null))
|
||||||
ifneq ($(strip $(LDFLAGS)),)
|
ifneq ($(strip $(LDFLAGS)),)
|
||||||
ldflags+=-extldflags=$(LDFLAGS)
|
ldflags+=-extldflags=$(LDFLAGS)
|
||||||
|
Loading…
Reference in New Issue
Block a user