From a02c39efd01707d025be4b11f6e5e066d68cd5c3 Mon Sep 17 00:00:00 2001 From: William Douglas Date: Thu, 24 Jan 2019 09:20:21 -0800 Subject: [PATCH] Makefile: Set arch regardless of GOPATH state Architecture-dependent settings were not being populated when GOPATH was set. This change ensures they are always set. Fixes #1169 Signed-off-by: William Douglas --- Makefile | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 1c11f748d6..86ce694249 100644 --- a/Makefile +++ b/Makefile @@ -23,22 +23,20 @@ ifeq ($(SKIP_GO_VERSION_CHECK),) include golang.mk endif -ifneq ($(GOPATH),) - GOARCH=$(shell go env GOARCH) - ifeq ($(ARCH),) - ARCH = $(GOARCH) - endif - - ARCH_DIR = arch - ARCH_FILE_SUFFIX = -options.mk - ARCH_FILE = $(ARCH_DIR)/$(ARCH)$(ARCH_FILE_SUFFIX) - ARCH_FILES = $(wildcard arch/*$(ARCH_FILE_SUFFIX)) - ALL_ARCHES = $(patsubst $(ARCH_DIR)/%$(ARCH_FILE_SUFFIX),%,$(ARCH_FILES)) - - # Load architecture-dependent settings - include $(ARCH_FILE) +GOARCH=$(shell go env GOARCH) +ifeq ($(ARCH),) + ARCH = $(GOARCH) endif +ARCH_DIR = arch +ARCH_FILE_SUFFIX = -options.mk +ARCH_FILE = $(ARCH_DIR)/$(ARCH)$(ARCH_FILE_SUFFIX) +ARCH_FILES = $(wildcard arch/*$(ARCH_FILE_SUFFIX)) +ALL_ARCHES = $(patsubst $(ARCH_DIR)/%$(ARCH_FILE_SUFFIX),%,$(ARCH_FILES)) + +# Load architecture-dependent settings +include $(ARCH_FILE) + PROJECT_TYPE = kata PROJECT_NAME = Kata Containers PROJECT_TAG = kata-containers