diff --git a/Makefile.COMMON b/Makefile.COMMON index 29f8ec13..becfe5bf 100644 --- a/Makefile.COMMON +++ b/Makefile.COMMON @@ -44,7 +44,7 @@ SRC ?= $(shell find . -type f -name "*.go" ! -path "./.build/*") GOOS ?= $(shell uname | tr A-Z a-z) GOARCH ?= $(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) -GO_VERSION ?= 1.5.1 +GO_VERSION ?= 1.5.2 GOURL ?= https://golang.org/dl GOPKG ?= go$(GO_VERSION).$(GOOS)-$(GOARCH).tar.gz GOPATH := $(CURDIR)/.build/gopath @@ -79,8 +79,11 @@ $(GOCC): @echo Abort now if you want to manually install it system-wide instead. @echo @sleep 5 - mkdir -p $(GOROOT) - curl -L $(GOURL)/$(GOPKG) | tar -C $(GOROOT) --strip 1 -xz + mkdir -p .build + # The archive contains a single directory called 'go/'. + curl -L $(GOURL)/$(GOPKG) | tar -C .build -xzf - + rm -rf $(GOROOT) + mv .build/go $(GOROOT) $(SELFLINK): mkdir -p $(dir $@) @@ -97,7 +100,7 @@ $(BINARY): $(GOCC) $(SRC) dependencies-stamp Makefile Makefile.COMMON archive: $(ARCHIVE) $(ARCHIVE): $(BINARY) - tar --owner=root --group=root -czf $@ $< + tar -czf $@ $< .PHONY: tag tag: