From c7037c434be04defcaf4d216cc6d10d66263f078 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Thu, 24 May 2018 16:22:15 +0200 Subject: [PATCH] make: Don't hardcode GOARCH in Makefile out/localkube.d and out/minikube-* targets should be able to build on every architecture. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2427c6f62e1d..c943d085df18 100755 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ out/minikube$(IS_EXE): out/minikube-$(GOOS)-$(GOARCH)$(IS_EXE) cp $< $@ out/localkube.d: - GOOS=linux GOARCH=amd64 $(MAKEDEPEND) out/localkube $(ORG) $(LOCALKUBEFILES) $^ > $@ + GOOS=linux GOARCH=$(GOARCH) $(MAKEDEPEND) out/localkube $(ORG) $(LOCALKUBEFILES) $^ > $@ -include out/localkube.d out/localkube: @@ -115,14 +115,14 @@ out/minikube.d: pkg/minikube/assets/assets.go $(MAKEDEPEND) out/minikube-$(GOOS)-$(GOARCH) $(ORG) $(MINIKUBEFILES) $^ > $@ -include out/minikube.d -out/minikube-%-amd64: pkg/minikube/assets/assets.go +out/minikube-%-$(GOARCH): pkg/minikube/assets/assets.go ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y) $(call DOCKER,$(BUILD_IMAGE),/usr/bin/make $@) else ifneq ($(GOPATH)/src/$(REPOPATH),$(PWD)) $(warning Warning: Building minikube outside the GOPATH, should be $(GOPATH)/src/$(REPOPATH) but is $(PWD)) endif - GOOS=$* go build -tags "$(MINIKUBE_BUILD_TAGS)" -ldflags="$(MINIKUBE_LDFLAGS) $(K8S_VERSION_LDFLAGS)" -a -o $@ k8s.io/minikube/cmd/minikube + GOOS=$* GOARCH=$(GOARCH) go build -tags "$(MINIKUBE_BUILD_TAGS)" -ldflags="$(MINIKUBE_LDFLAGS) $(K8S_VERSION_LDFLAGS)" -a -o $@ k8s.io/minikube/cmd/minikube endif .PHONY: e2e-%-amd64