mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-01 09:42:45 +00:00
makefile: Add make install
allow install osbuilder scripts. Example: make install DESTDIR=/tmp/t export DISTRO_REPO=1 export GOPATH=~/go export AGENT_SOURCE_BIN=/tmp/usr/bin/kata-agent /tmp/t/usr/libexec/kata-containers/osbuilder/rootfs-builder/rootfs.sh fedora pushd /tmp/t/usr/libexec/kata-containers/osbuilder/rootfs-builder /tmp/t/usr/libexec/kata-containers/osbuilder/image-builder/image_builder.sh $(pwd)/rootfs-Fedora Fixes: #206 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
39e6aa4094
commit
06c8d88eb6
34
Makefile
34
Makefile
@ -88,6 +88,40 @@ test-initrd-only:
|
||||
list-distros:
|
||||
@ $(ROOTFS_BUILDER) -l
|
||||
|
||||
DESTDIR := /
|
||||
KATADIR := /usr/libexec/kata-containers
|
||||
OSBUILDER_DIR := $(KATADIR)/osbuilder
|
||||
INSTALL_DIR :=$(DESTDIR)/$(OSBUILDER_DIR)
|
||||
DIST_CONFIGS:= $(wildcard rootfs-builder/*/config.sh)
|
||||
|
||||
SCRIPTS :=
|
||||
SCRIPTS += rootfs-builder/rootfs.sh
|
||||
SCRIPTS += image-builder/image_builder.sh
|
||||
SCRIPTS += initrd-builder/initrd_builder.sh
|
||||
|
||||
FILES :=
|
||||
FILES += rootfs-builder/versions.txt
|
||||
FILES += scripts/lib.sh
|
||||
|
||||
define INSTALL_FILE
|
||||
echo "Installing $(abspath $2/$1)";
|
||||
install -m 644 -D $1 $2/$1;
|
||||
endef
|
||||
|
||||
define INSTALL_SCRIPT
|
||||
echo "Installing $(abspath $2/$1)";
|
||||
install -m 755 -D $1 $(abspath $2/$1);
|
||||
endef
|
||||
|
||||
.PHONY: install-scripts
|
||||
install-scripts:
|
||||
@echo "Installing scripts"
|
||||
@$(foreach f,$(SCRIPTS),$(call INSTALL_SCRIPT,$f,$(INSTALL_DIR)))
|
||||
@echo "Installing helper files"
|
||||
@$(foreach f,$(FILES),$(call INSTALL_FILE,$f,$(INSTALL_DIR)))
|
||||
@echo "Installing installing config files"
|
||||
@$(foreach f,$(DIST_CONFIGS),$(call INSTALL_FILE,$f,$(INSTALL_DIR)))
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(DISTRO_ROOTFS_MARKER) $(DISTRO_ROOTFS) $(DISTRO_IMAGE) $(DISTRO_INITRD)
|
||||
|
Loading…
Reference in New Issue
Block a user