From 7997218cedf13613be24287336d98affba379cec Mon Sep 17 00:00:00 2001 From: Jose Carlos Venegas Munoz Date: Thu, 26 Mar 2020 20:59:38 +0000 Subject: [PATCH] Makefile: Allow change default hypervisor via env var - Add support to change default hypervisor via env variable. - Show in the summary the default hypervisor to be used. ``` export DEFAULT_HYPEVISOR=cloud-hypervisor make sudo -E make install ``` Fixes: #2565 Signed-off-by: Jose Carlos Venegas Munoz --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5bb16f7cff..5fa7e6b615 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ HYPERVISOR_CLH = cloud-hypervisor HYPERVISOR_QEMU_VIRTIOFS = qemu-virtiofs # Determines which hypervisor is specified in $(CONFIG_FILE). -DEFAULT_HYPERVISOR = $(HYPERVISOR_QEMU) +DEFAULT_HYPERVISOR ?= $(HYPERVISOR_QEMU) # List of hypervisors this build system can generate configuration for. HYPERVISORS := $(HYPERVISOR_ACRN) $(HYPERVISOR_FC) $(HYPERVISOR_QEMU) $(HYPERVISOR_QEMU_VIRTIOFS) $(HYPERVISOR_CLH) @@ -749,6 +749,7 @@ else endif @printf "\n" @printf "• hypervisors:\n" + @printf "\tDefault: $(DEFAULT_HYPERVISOR)\n" @printf "\tKnown: $(sort $(HYPERVISORS))\n" @printf "\tAvailable for this architecture: $(sort $(KNOWN_HYPERVISORS))\n" @printf "\n"