Allow overriding url to fetch go from by env var
If you want to use a different binary package than the officially provided, you now can point the env var GOURL to the package you want to get instead. Change-Id: I1cefe2998bc86435cfbd058ba398a7b6c4e7d031
This commit is contained in:
parent
88099328d1
commit
d438e1c96c
2
Makefile
2
Makefile
|
@ -38,7 +38,7 @@ tarball: build
|
||||||
tar -C $(BUILD_PATH)/package -czf prometheus.tar.gz .
|
tar -C $(BUILD_PATH)/package -czf prometheus.tar.gz .
|
||||||
|
|
||||||
$(BUILD_PATH)/cache/$(GOPKG):
|
$(BUILD_PATH)/cache/$(GOPKG):
|
||||||
curl -o $@ http://go.googlecode.com/files/$(GOPKG)
|
curl -o $@ $(GOURL)/$(GOPKG)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -C $(BUILD_PATH) clean
|
$(MAKE) -C $(BUILD_PATH) clean
|
||||||
|
|
|
@ -30,17 +30,18 @@ ARCH=$(shell uname -m)
|
||||||
|
|
||||||
BUILD_PATH = $(PWD)/.build
|
BUILD_PATH = $(PWD)/.build
|
||||||
|
|
||||||
GO_VERSION := 1.1
|
GO_VERSION := 1.1
|
||||||
GOOS = $(subst Darwin,darwin,$(subst Linux,linux,$(OS)))
|
GOOS = $(subst Darwin,darwin,$(subst Linux,linux,$(OS)))
|
||||||
GOARCH = $(subst x86_64,amd64,$(ARCH))
|
GOARCH = $(subst x86_64,amd64,$(ARCH))
|
||||||
GOPKG = go$(GO_VERSION).$(GOOS)-$(GOARCH).tar.gz
|
GOPKG ?= go$(GO_VERSION).$(GOOS)-$(GOARCH).tar.gz
|
||||||
GOROOT = $(BUILD_PATH)/root/go
|
GOURL ?= http://go.googlecode.com/files
|
||||||
GOPATH = $(BUILD_PATH)/root/gopath
|
GOROOT = $(BUILD_PATH)/root/go
|
||||||
GOCC = $(GOROOT)/bin/go
|
GOPATH = $(BUILD_PATH)/root/gopath
|
||||||
TMPDIR = /tmp
|
GOCC = $(GOROOT)/bin/go
|
||||||
GOENV = TMPDIR=$(TMPDIR) GOROOT=$(GOROOT) GOPATH=$(GOPATH)
|
TMPDIR = /tmp
|
||||||
GO = $(GOENV) $(GOCC)
|
GOENV = TMPDIR=$(TMPDIR) GOROOT=$(GOROOT) GOPATH=$(GOPATH)
|
||||||
GOFMT = $(GOROOT)/bin/gofmt
|
GO = $(GOENV) $(GOCC)
|
||||||
|
GOFMT = $(GOROOT)/bin/gofmt
|
||||||
|
|
||||||
LEVELDB_VERSION := 1.12.0
|
LEVELDB_VERSION := 1.12.0
|
||||||
PROTOCOL_BUFFERS_VERSION := 2.5.0
|
PROTOCOL_BUFFERS_VERSION := 2.5.0
|
||||||
|
|
Loading…
Reference in New Issue