Makefile: Calculate $(GOROOT), etc. relative to Makefile instead of using $(PWD), which is not always available (eg., in debuild).
This commit is contained in:
parent
942cd35dea
commit
6d8e79c198
|
@ -31,11 +31,13 @@ else
|
||||||
RELEASE_SUFFIX ?=
|
RELEASE_SUFFIX ?=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
MAKEFILE_DIR ?= $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
|
||||||
|
|
||||||
GO_VERSION ?= 1.4.1
|
GO_VERSION ?= 1.4.1
|
||||||
GOURL ?= https://golang.org/dl
|
GOURL ?= https://golang.org/dl
|
||||||
GOPKG ?= go$(GO_VERSION).$(GOOS)-$(GOARCH)$(RELEASE_SUFFIX).tar.gz
|
GOPKG ?= go$(GO_VERSION).$(GOOS)-$(GOARCH)$(RELEASE_SUFFIX).tar.gz
|
||||||
GOROOT := $(PWD)/.deps/go
|
GOROOT := $(MAKEFILE_DIR)/.deps/go
|
||||||
GOPATH := $(PWD)/.deps/gopath
|
GOPATH := $(MAKEFILE_DIR)/.deps/gopath
|
||||||
GOCC := $(GOROOT)/bin/go
|
GOCC := $(GOROOT)/bin/go
|
||||||
GO := GOROOT=$(GOROOT) GOPATH=$(GOPATH) $(GOCC)
|
GO := GOROOT=$(GOROOT) GOPATH=$(GOPATH) $(GOCC)
|
||||||
GOFMT := $(GOROOT)/bin/gofmt
|
GOFMT := $(GOROOT)/bin/gofmt
|
||||||
|
|
Loading…
Reference in New Issue