mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-20 04:36:37 +00:00
Merge pull request #4031 from tianon/gopath
Add slightly better GOPATH detection/handling
This commit is contained in:
@@ -68,6 +68,19 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$AUTO_GOPATH" ]; then
|
||||
rm -rf .gopath
|
||||
mkdir -p .gopath/src/github.com/dotcloud
|
||||
ln -sf ../../../.. .gopath/src/github.com/dotcloud/docker
|
||||
export GOPATH="$(pwd)/.gopath:$(pwd)/vendor"
|
||||
fi
|
||||
|
||||
if [ ! "$GOPATH" ]; then
|
||||
echo >&2 'error: missing GOPATH; please see http://golang.org/doc/code.html#GOPATH'
|
||||
echo >&2 ' alternatively, set AUTO_GOPATH=1'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use these flags when compiling the tests and final binary
|
||||
LDFLAGS='-X main.GITCOMMIT "'$GITCOMMIT'" -X main.VERSION "'$VERSION'" -w'
|
||||
LDFLAGS_STATIC='-X github.com/dotcloud/docker/utils.IAMSTATIC true -linkmode external -extldflags "-lpthread -static -Wl,--unresolved-symbols=ignore-in-object-files"'
|
||||
|
||||
Reference in New Issue
Block a user