mirror of https://github.com/docker/docs.git
Fix #494
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
This commit is contained in:
parent
e42734f2aa
commit
ff18c1b7d0
|
@ -3,11 +3,18 @@ extension = $(patsubst windows,.exe,$(filter windows,$(1)))
|
|||
# Valid target combinations
|
||||
VALID_OS_ARCH := "[darwin/amd64][linux/amd64][windows/amd64][windows/386]"
|
||||
|
||||
os.darwin := Darwin
|
||||
os.linux := Linux
|
||||
os.windows := Windows
|
||||
|
||||
arch.amd64 := x86_64
|
||||
arch.386 := i386
|
||||
|
||||
define gocross
|
||||
$(if $(findstring [$(1)/$(2)],$(VALID_OS_ARCH)), \
|
||||
GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 \
|
||||
$(GO) build \
|
||||
-o $(PREFIX)/bin/docker-machine_$(1)-$(2)$(call extension,$(GOOS)) \
|
||||
-o $(PREFIX)/bin/docker-machine-${os.$(1)}-${arch.$(2)}$(call extension,$(GOOS)) \
|
||||
-a $(VERBOSE_GO) -tags "static_build netgo $(BUILDTAGS)" -installsuffix netgo \
|
||||
-ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;)
|
||||
endef
|
||||
|
|
Loading…
Reference in New Issue