make: fix build when symlinked into GOPATH
In workspace setups that have the source tree symlinked into GOPATH, the `go list `command wouldn't recognize that we're technically within GOPATH, because `pwd` doesn't look like it. For example /home/user/go/src/github.com/ipfs/go-ipfs => /home/user/go/ipfs/go-ipfs produces the import path _/home/user/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-random/random which is not within GOPATH. We get around this by using fully-qualified import paths instead: starting in github.com/ipfs/go-ipfs/ instead of ./ License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
Lars Gierth committed
Mar 11, 2017 at 04:09 UTC
b54df01dbea302529589b1281af2aab83d7b06a7
1 file changed
+1
-1
mk/golang.mk
+1
-1
@@ -10,7 +10,7 @@ DEPS_GO :=
10
TEST_GO :=
11
CHECK_GO :=
12
13
-go-pkg-name=$(shell go list $(go-tags) ./$(1))
13
+go-pkg-name=$(shell go list $(go-tags) github.com/ipfs/go-ipfs/$(1))
14
go-main-name=$(notdir $(call go-pkg-name,$(1)))$(?exe)
15
go-curr-pkg-tgt=$(d)/$(call go-main-name,$(d))
16