forked from mirrors/statsd_exporter
Update Makefile.COMMON
This commit is contained in:
parent
729bdfeef7
commit
ec25a3dbfe
1 changed files with 10 additions and 9 deletions
|
@ -41,20 +41,14 @@ VERSION ?= $(error VERSION not set in including Makefile)
|
||||||
TARGET ?= $(error TARGET not set in including Makefile)
|
TARGET ?= $(error TARGET not set in including Makefile)
|
||||||
|
|
||||||
SRC ?= $(shell find . -type f -name "*.go" ! -path "./.build/*")
|
SRC ?= $(shell find . -type f -name "*.go" ! -path "./.build/*")
|
||||||
GOOS := $(shell uname | tr A-Z a-z)
|
GOOS ?= $(shell uname | tr A-Z a-z)
|
||||||
GOARCH := $(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m)))
|
GOARCH ?= $(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m)))
|
||||||
|
|
||||||
ifeq ($(GOOS),darwin)
|
ifeq ($(GOOS),darwin)
|
||||||
RELEASE_SUFFIX ?= -osx$(shell sw_vers -productVersion)
|
RELEASE_SUFFIX ?= -osx$(shell sw_vers -productVersion)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
GO_VERSION ?= 1.4.1
|
GO_VERSION ?= 1.4.2
|
||||||
GOURL ?= https://golang.org/dl
|
|
||||||
GOPKG ?= go$(GO_VERSION).$(GOOS)-$(GOARCH)$(RELEASE_SUFFIX).tar.gz
|
|
||||||
GOPATH := $(CURDIR)/.build/gopath
|
|
||||||
GOCC ?= $(GOROOT)/bin/go
|
|
||||||
GO ?= GOROOT=$(GOROOT) GOPATH=$(GOPATH) $(GOCC)
|
|
||||||
GOFMT ?= $(GOROOT)/bin/gofmt
|
|
||||||
|
|
||||||
ifeq ($(shell type go >/dev/null && go version | sed 's/.*go\([0-9.]*\).*/\1/'), $(GO_VERSION))
|
ifeq ($(shell type go >/dev/null && go version | sed 's/.*go\([0-9.]*\).*/\1/'), $(GO_VERSION))
|
||||||
GOROOT := $(shell go env GOROOT)
|
GOROOT := $(shell go env GOROOT)
|
||||||
|
@ -62,6 +56,13 @@ else
|
||||||
GOROOT := $(CURDIR)/.build/go$(GO_VERSION)
|
GOROOT := $(CURDIR)/.build/go$(GO_VERSION)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
GOURL ?= https://golang.org/dl
|
||||||
|
GOPKG ?= go$(GO_VERSION).$(GOOS)-$(GOARCH)$(RELEASE_SUFFIX).tar.gz
|
||||||
|
GOPATH := $(CURDIR)/.build/gopath
|
||||||
|
GOCC ?= $(GOROOT)/bin/go
|
||||||
|
GO ?= GOROOT=$(GOROOT) GOPATH=$(GOPATH) $(GOCC)
|
||||||
|
GOFMT ?= $(GOROOT)/bin/gofmt
|
||||||
|
|
||||||
# Never honor GOBIN, should it be set at all.
|
# Never honor GOBIN, should it be set at all.
|
||||||
unexport GOBIN
|
unexport GOBIN
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue