Browse Source

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
changes/32/32/1
Johannes 'fish' Ziemke 11 years ago
parent
commit
d438e1c96c
  1. 2
      Makefile
  2. 3
      Makefile.INCLUDE

2
Makefile

@ -38,7 +38,7 @@ tarball: build
tar -C $(BUILD_PATH)/package -czf prometheus.tar.gz .
$(BUILD_PATH)/cache/$(GOPKG):
curl -o $@ http://go.googlecode.com/files/$(GOPKG)
curl -o $@ $(GOURL)/$(GOPKG)
clean:
$(MAKE) -C $(BUILD_PATH) clean

3
Makefile.INCLUDE

@ -33,7 +33,8 @@ BUILD_PATH = $(PWD)/.build
GO_VERSION := 1.1
GOOS = $(subst Darwin,darwin,$(subst Linux,linux,$(OS)))
GOARCH = $(subst x86_64,amd64,$(ARCH))
GOPKG = go$(GO_VERSION).$(GOOS)-$(GOARCH).tar.gz
GOPKG ?= go$(GO_VERSION).$(GOOS)-$(GOARCH).tar.gz
GOURL ?= http://go.googlecode.com/files
GOROOT = $(BUILD_PATH)/root/go
GOPATH = $(BUILD_PATH)/root/gopath
GOCC = $(GOROOT)/bin/go

Loading…
Cancel
Save