Skip to content

Commit

Permalink
Makefile: Calculate $(GOROOT), etc. relative to Makefile instead of u…
Browse files Browse the repository at this point in the history
…sing $(PWD), which is not always available (eg., in debuild).
  • Loading branch information
Alexander Staubo committed Feb 23, 2015
1 parent 452c889 commit 8a47f8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ config:
$(MAKE) -C config

$(SELFLINK): $(GOPATH)
ln -s $(CURDIR) $@
ln -s $(MAKEFILE_DIR) $@

$(GOPATH):
cp -a $(CURDIR)/Godeps/_workspace $(GOPATH)
cp -a $(MAKEFILE_DIR)/Godeps/_workspace $(GOPATH)

dependencies: $(GOCC) | $(SELFLINK)

Expand Down
4 changes: 3 additions & 1 deletion Makefile.INCLUDE
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ ARCH=$(shell uname -m)
# Mac OS X release family.
MAC_OS_X_VERSION ?= 10.8

BUILD_PATH = $(PWD)/.build
MAKEFILE_DIR ?= $(realpath $(dir $(lastword $(MAKEFILE_LIST))))

BUILD_PATH = $(MAKEFILE_DIR)/.build

GO_VERSION := 1.4
GOOS = $(subst Darwin,darwin,$(subst Linux,linux,$(subst FreeBSD,freebsd,$(OS))))
Expand Down

0 comments on commit 8a47f8a

Please sign in to comment.