build: put install methods in utils.mk

put install methods in utils.mk to avoid duplication

Fixes: #4379
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
This commit is contained in:
Zhongtao Hu
2022-06-07 15:48:25 +08:00
parent 8a697268d0
commit 242992e3de
2 changed files with 45 additions and 4 deletions

View File

@@ -250,6 +250,9 @@ USER_VARS += RUNTIMENAME
USER_VARS += HYPERVISOR_DB
USER_VARS += PIPESIZE
USER_VARS += DBSHAREDFS
USER_VARS += KATA_INSTALL_GROUP
USER_VARS += KATA_INSTALL_OWNER
USER_VARS += KATA_INSTALL_CFG_PERMS
SOURCES := \
$(shell find . 2>&1 | grep -E '.*\.rs$$') \
@@ -318,10 +321,6 @@ define INSTALL_FILE
install -D -m 644 $1 $(DESTDIR)$2/$1 || exit 1;
endef
define INSTALL_CONFIG
sudo install --mode 0644 -D $1 $(DESTDIR)$2/$(notdir $1);
endef
# Returns the name of the kernel file to use based on the provided KERNELTYPE.
# $1 : KERNELTYPE (compressed or uncompressed)
define MAKE_KERNEL_NAME