From e0f4c528366a3d98ca5f3b4255be276135b5fbdc Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Sun, 28 Jan 2018 12:12:55 +0800 Subject: [PATCH] runv: modify GOPATH to build So that we can use runv repo as git submodule without splitting it. Signed-off-by: Peng Tao --- .gitignore | 1 + .gitmodules | 4 ++-- Makefile | 10 +++++++--- runv | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..8309f5ffc2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/build-runv diff --git a/.gitmodules b/.gitmodules index 88ea36799e..f77386343a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "cc-runtime"] path = cc-runtime url = https://github.com/clearcontainers/runtime -[submodule "runvcli"] +[submodule "runv"] path = runv - url = https://github.com/hyperhq/runvcli.git + url = https://github.com/hyperhq/runv.git diff --git a/Makefile b/Makefile index bcf2dcf4fd..cac09d4cc9 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,9 @@ endif ifeq (runv,$(KATA_RUNTIME)) RUNTIME_DIR = runv RUNTIME_NAME = runv + BUILD_ROOT = $(shell pwd)/build-runv + HYPER_ROOT = $(BUILD_ROOT)/src/github.com/hyperhq + RUNV_ROOT = $(HYPER_ROOT)/runv DESTTARGET = $(DESTBINDIR)/$(RUNTIME_NAME) endif @@ -47,7 +50,8 @@ ifeq (cc,$(KATA_RUNTIME)) make -C $(RUNTIME_DIR) build-kata-system TARGET=$(TARGET) DESTTARGET=$(DESTTARGET) endif ifeq (runv,$(KATA_RUNTIME)) - (cd $(RUNTIME_DIR) && [ -e configure ] || ./autogen.sh && ./configure && make) + mkdir -p $(HYPER_ROOT) && ln -sf $(shell pwd)/$(RUNTIME_DIR) $(RUNV_ROOT) + cd $(RUNV_ROOT) && [ -e configure ] || ./autogen.sh && ./configure && make GOPATH=$(BUILD_ROOT) endif install: install-runtime create-symlink @@ -57,7 +61,7 @@ ifeq (cc,$(KATA_RUNTIME)) make -C $(RUNTIME_DIR) install-kata-system TARGET=$(TARGET) DESTTARGET=$(DESTTARGET) endif ifeq (runv,$(KATA_RUNTIME)) - make -C $(RUNTIME_DIR) install + make -C $(RUNV_ROOT) install-exec-local endif create-symlink: @@ -71,7 +75,7 @@ ifeq (cc,$(KATA_RUNTIME)) make -C $(RUNTIME_DIR) clean TARGET=$(TARGET) endif ifeq (runv,$(KATA_RUNTIME)) - make -C $(RUNTIME_DIR) clean + make -C $(RUNV_ROOT) clean endif help: diff --git a/runv b/runv index c16abf7a68..299f4e6493 160000 --- a/runv +++ b/runv @@ -1 +1 @@ -Subproject commit c16abf7a687558b2c9f2eac5391513dc2bdb9b50 +Subproject commit 299f4e6493050173c0bd30a48fde31b3a34b0f24