From 2179fbf4a38c8909bc963d6571de17af82af1585 Mon Sep 17 00:00:00 2001 From: Zev Weiss Date: Sat, 18 Nov 2023 16:21:29 -0800 Subject: [PATCH] Add tiny Makefile for building virtme-ng-init This is primarily just a small convenience for building an updated virtme-ng-init when running vng from the source directory. In order to keep the definition of "how to build init" in one place, also update setup.py to run 'make' instead of directly invoking 'cargo'. Signed-off-by: Zev Weiss --- Makefile | 3 +++ setup.py | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9f702b2 --- /dev/null +++ b/Makefile @@ -0,0 +1,3 @@ +.PHONY: init +init: + cd virtme_ng_init && cargo install --path . --root ../virtme/guest diff --git a/setup.py b/setup.py index 9d3f299..cc7cf7e 100755 --- a/setup.py +++ b/setup.py @@ -59,10 +59,7 @@ def run(self): print(f"BUILD_VIRTME_NG_INIT: {build_virtme_ng_init}") # Build virtme-ng-init if build_virtme_ng_init: - check_call( - ["cargo", "install", "--path", ".", "--root", "../virtme/guest"], - cwd="virtme_ng_init", - ) + check_call(["make", "init"]) check_call( ["strip", "-s", "../virtme/guest/bin/virtme-ng-init"], cwd="virtme_ng_init",