Merge pull request #1225 from teawater/fixmakeinstall

Makefile: Set ARCH in GOPATH not set mode
This commit is contained in:
Peng Tao 2019-02-12 09:14:54 +08:00 committed by GitHub
commit 1c27ab79d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,10 +23,18 @@ ifeq ($(SKIP_GO_VERSION_CHECK),)
include golang.mk include golang.mk
endif endif
#Get ARCH.
ifneq ($(GOPATH),)
GOARCH=$(shell go env GOARCH) GOARCH=$(shell go env GOARCH)
ifeq ($(ARCH),) ifeq ($(ARCH),)
ARCH = $(GOARCH) ARCH = $(GOARCH)
endif endif
else
ARCH = $(shell uname -m)
ifeq ($(ARCH),x86_64)
ARCH = amd64
endif
endif
ARCH_DIR = arch ARCH_DIR = arch
ARCH_FILE_SUFFIX = -options.mk ARCH_FILE_SUFFIX = -options.mk