Skip to content

Commit

Permalink
Allow overriding url to fetch go from by env var
Browse files Browse the repository at this point in the history
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
  • Loading branch information
discordianfish committed Sep 4, 2013
1 parent 8809932 commit d438e1c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 12 additions & 11 deletions Makefile.INCLUDE
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ ARCH=$(shell uname -m)

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
GOROOT = $(BUILD_PATH)/root/go
GOPATH = $(BUILD_PATH)/root/gopath
GOCC = $(GOROOT)/bin/go
TMPDIR = /tmp
GOENV = TMPDIR=$(TMPDIR) GOROOT=$(GOROOT) GOPATH=$(GOPATH)
GO = $(GOENV) $(GOCC)
GOFMT = $(GOROOT)/bin/gofmt
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
GOURL ?= http://go.googlecode.com/files
GOROOT = $(BUILD_PATH)/root/go
GOPATH = $(BUILD_PATH)/root/gopath
GOCC = $(GOROOT)/bin/go
TMPDIR = /tmp
GOENV = TMPDIR=$(TMPDIR) GOROOT=$(GOROOT) GOPATH=$(GOPATH)
GO = $(GOENV) $(GOCC)
GOFMT = $(GOROOT)/bin/gofmt

LEVELDB_VERSION := 1.12.0
PROTOCOL_BUFFERS_VERSION := 2.5.0
Expand Down

0 comments on commit d438e1c

Please sign in to comment.