Skip to content
This repository was archived by the owner on Jan 11, 2022. It is now read-only.

Commit a5c0897

Browse files
committed
Update Makefile.COMMON
1 parent 8e4cdef commit a5c0897

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Makefile.COMMON

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,28 @@ VERSION ?= $(error VERSION not set in including Makefile)
4141
TARGET ?= $(error TARGET not set in including Makefile)
4242

4343
SRC ?= $(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

4747
ifeq ($(GOOS),darwin)
4848
RELEASE_SUFFIX ?= -osx$(shell sw_vers -productVersion)
4949
endif
5050

5151
GO_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

5953
ifeq ($(shell type go >/dev/null && go version | sed 's/.*go\([0-9.]*\).*/\1/'), $(GO_VERSION))
6054
GOROOT := $(shell go env GOROOT)
6155
else
6256
GOROOT := $(CURDIR)/.build/go$(GO_VERSION)
6357
endif
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.
6667
unexport GOBIN
6768

0 commit comments

Comments
 (0)