Skip to content

Commit

Permalink
Add tiny Makefile for building virtme-ng-init
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
zevweiss committed Nov 20, 2023
1 parent 4c65839 commit 2179fbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.PHONY: init
init:
cd virtme_ng_init && cargo install --path . --root ../virtme/guest
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 2179fbf

Please sign in to comment.