Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1225 from teawater/fixmakeinstall
Browse files Browse the repository at this point in the history
Makefile: Set ARCH in GOPATH not set mode
  • Loading branch information
bergwolf authored Feb 12, 2019
2 parents 6431f1f + 81c7a96 commit 1c27ab7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,17 @@ ifeq ($(SKIP_GO_VERSION_CHECK),)
include golang.mk
endif

GOARCH=$(shell go env GOARCH)
ifeq ($(ARCH),)
ARCH = $(GOARCH)
#Get ARCH.
ifneq ($(GOPATH),)
GOARCH=$(shell go env GOARCH)
ifeq ($(ARCH),)
ARCH = $(GOARCH)
endif
else
ARCH = $(shell uname -m)
ifeq ($(ARCH),x86_64)
ARCH = amd64
endif
endif

ARCH_DIR = arch
Expand Down

0 comments on commit 1c27ab7

Please sign in to comment.