@@ -41,27 +41,28 @@ VERSION ?= $(error VERSION not set in including Makefile)
4141TARGET ?= $(error TARGET not set in including Makefile)
4242
4343SRC ?= $(shell find . -type f -name "*.go" ! -path "./.build/*")
44- GOOS : = $(shell uname | tr A-Z a-z)
45- GOARCH : = $(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m)))
44+ GOOS ? = $(shell uname | tr A-Z a-z)
45+ GOARCH ? = $(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m)))
4646
4747ifeq ($(GOOS),darwin)
4848 RELEASE_SUFFIX ?= -osx$(shell sw_vers -productVersion)
4949endif
5050
5151GO_VERSION ?= 1.4.2
52- GOURL ?= https://golang.org/dl
53- GOPKG ?= go$(GO_VERSION).$(GOOS)-$(GOARCH)$(RELEASE_SUFFIX).tar.gz
54- GOPATH := $(CURDIR)/.build/gopath
55- GOCC ?= $(GOROOT)/bin/go
56- GO ?= GOROOT=$(GOROOT) GOPATH=$(GOPATH) $(GOCC)
57- GOFMT ?= $(GOROOT)/bin/gofmt
5852
5953ifeq ($(shell type go >/dev/null && go version | sed 's/.*go\([0-9.]*\).*/\1/'), $(GO_VERSION))
6054 GOROOT := $(shell go env GOROOT)
6155else
6256 GOROOT := $(CURDIR)/.build/go$(GO_VERSION)
6357endif
6458
59+ GOURL ?= https://golang.org/dl
60+ GOPKG ?= go$(GO_VERSION).$(GOOS)-$(GOARCH)$(RELEASE_SUFFIX).tar.gz
61+ GOPATH := $(CURDIR)/.build/gopath
62+ GOCC ?= $(GOROOT)/bin/go
63+ GO ?= GOROOT=$(GOROOT) GOPATH=$(GOPATH) $(GOCC)
64+ GOFMT ?= $(GOROOT)/bin/gofmt
65+
6566# Never honor GOBIN, should it be set at all.
6667unexport GOBIN
6768
0 commit comments