From ed7edf771fb89957a4e260d395aeed3bb42cb0be Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Mon, 12 Oct 2015 19:17:58 +0800 Subject: [PATCH] Make runc buildable everywhere Currently we need to clone github.com/opencontainers/runc to GOPATH so we can make it, it's not friendly for developers. We can resolve it by vendoring itself as a symlink in GOPATH. Signed-off-by: Qiang Huang --- .gitignore | 3 ++- Makefile | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 41b84182..266ee084 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ vendor/pkg -runc +/runc +Godeps/_workspace/src/github.com/opencontainers/runc diff --git a/Makefile b/Makefile index 520b0120..0253820a 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ BUILDTAGS=seccomp export GOPATH:=$(CURDIR)/Godeps/_workspace:$(GOPATH) all: + ln -sfn $(CURDIR) $(CURDIR)/Godeps/_workspace/src/github.com/opencontainers/runc go build -tags "$(BUILDTAGS)" -o runc . vet: @@ -29,6 +30,7 @@ install: clean: rm runc + rm $(CURDIR)/Godeps/_workspace/src/github.com/opencontainers/runc validate: vet script/validate-gofmt