From b0b32b702d86bbcfb1dd7d5a8ac17d3121660088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Sun, 17 Mar 2019 12:17:19 +0100 Subject: [PATCH] Allow building minikube for any architecture Currently it is hardcoded to build for any GOOS, but same GOARCH. Change this to allow building for any combination of: minikube-*-* --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 77bec70d4745..842d88d981d0 100755 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ out/minikube.d: pkg/minikube/assets/assets.go $(MAKEDEPEND) out/minikube-$(GOOS)-$(GOARCH) $(ORG) $^ $(MINIKUBEFILES) > $@ -include out/minikube.d -out/minikube-%-$(GOARCH): pkg/minikube/assets/assets.go +out/minikube-%: pkg/minikube/assets/assets.go ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y) $(call DOCKER,$(BUILD_IMAGE),/usr/bin/make $@) else @@ -114,7 +114,7 @@ ifneq ($(GOPATH)/src/$(REPOPATH),$(CURDIR)) $(warning https://github.com/kubernetes/minikube/blob/master/docs/contributors/build_guide.md) $(warning ******************************************************************************) endif - GOOS=$* GOARCH=$(GOARCH) go build -tags "$(MINIKUBE_BUILD_TAGS)" -ldflags="$(MINIKUBE_LDFLAGS)" -a -o $@ k8s.io/minikube/cmd/minikube + GOOS="$(firstword $(subst -, ,$*))" GOARCH="$(lastword $(subst -, ,$*))" go build -tags "$(MINIKUBE_BUILD_TAGS)" -ldflags="$(MINIKUBE_LDFLAGS)" -a -o $@ k8s.io/minikube/cmd/minikube endif .PHONY: e2e-%-amd64