Browse code

Merge pull request #39069 from thaJeztah/fix_cross

Fix DOCKER_CROSS being overwritten

Brian Goff authored on 2019/04/16 08:01:09
Showing 1 changed files
... ...
@@ -4,6 +4,9 @@
4 4
 DOCKER_GRAPHDRIVER := $(if $(DOCKER_GRAPHDRIVER),$(DOCKER_GRAPHDRIVER),$(shell docker info 2>&1 | grep "Storage Driver" | sed 's/.*: //'))
5 5
 export DOCKER_GRAPHDRIVER
6 6
 
7
+# enable/disable cross-compile
8
+DOCKER_CROSS ?= false
9
+
7 10
 # get OS/Arch of docker engine
8 11
 DOCKER_OSARCH := $(shell bash -c 'source hack/make/.detect-daemon-osarch && echo $${DOCKER_ENGINE_OSARCH}')
9 12
 DOCKERFILE := $(shell bash -c 'source hack/make/.detect-daemon-osarch && echo $${DOCKERFILE}')
... ...
@@ -139,8 +142,6 @@ cross: build ## cross build the binaries for darwin, freebsd and\nwindows
139 139
 
140 140
 ifdef DOCKER_CROSSPLATFORMS
141 141
 build: DOCKER_CROSS := true
142
-else
143
-build: DOCKER_CROSS ?= false
144 142
 endif
145 143
 ifeq ($(BIND_DIR), .)
146 144
 build: DOCKER_BUILD_OPTS += --target=dev