]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
Generate $(env)_{arch,guest} mappings automatically
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 16 Feb 2017 14:23:55 +0000 (14:23 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 22 May 2017 12:21:25 +0000 (13:21 +0100)
Rather than opencoding them.  Drop the defcfg-$(env) mapping entirely and
reimplement its user in terms of $(env)_guest.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
build/common.mk
build/gen.mk

index c26a7cd2532d4d938fe018b25ca65a3c3b884586..8c1a55f8273aaf826d9d74be398ca8659ded9f6d 100644 (file)
@@ -7,12 +7,13 @@ HVM_ENVIRONMENTS   := $(filter hvm%,$(ALL_ENVIRONMENTS))
 32BIT_ENVIRONMENTS := $(filter pv32% hvm32%,$(ALL_ENVIRONMENTS))
 64BIT_ENVIRONMENTS := $(filter pv64% hvm64%,$(ALL_ENVIRONMENTS))
 
-pv64_arch     := x86_64
-pv32pae_arch  := x86_32
-hvm64_arch    := x86_64
-hvm32pae_arch := x86_32
-hvm32pse_arch := x86_32
-hvm32_arch    := x86_32
+# $(env)_guest => pv or hvm mapping
+$(foreach env,$(PV_ENVIRONMENTS),$(eval $(env)_guest := pv))
+$(foreach env,$(HVM_ENVIRONMENTS),$(eval $(env)_guest := hvm))
+
+# $(env)_arch => x86_32/64 mapping
+$(foreach env,$(32BIT_ENVIRONMENTS),$(eval $(env)_arch := x86_32))
+$(foreach env,$(64BIT_ENVIRONMENTS),$(eval $(env)_arch := x86_64))
 
 COMMON_FLAGS := -pipe -I$(ROOT)/include -I$(ROOT)/arch/x86/include -MMD -MP
 
@@ -39,13 +40,6 @@ head-hvm32    := $(ROOT)/arch/x86/boot/head_hvm32.o
 defcfg-pv    := $(ROOT)/config/default-pv.cfg.in
 defcfg-hvm   := $(ROOT)/config/default-hvm.cfg.in
 
-defcfg-pv64     := $(defcfg-pv)
-defcfg-pv32pae  := $(defcfg-pv)
-defcfg-hvm64    := $(defcfg-hvm)
-defcfg-hvm32pae := $(defcfg-hvm)
-defcfg-hvm32pse := $(defcfg-hvm)
-defcfg-hvm32    := $(defcfg-hvm)
-
 obj-perarch :=
 obj-perenv  :=
 include $(ROOT)/build/files.mk
index 9a1c6b9087c824291d6c57f9d6cea1d402fecd47..8d7a6bf89725fedc8343d2e4d3c8e2c93c16811f 100644 (file)
@@ -56,7 +56,7 @@ test-$(1)-$(NAME): $$(DEPS-$(1)) $$(link-$(1))
        rm -f $$@.tmp
 endif
 
-cfg-$(1) ?= $(defcfg-$(1))
+cfg-$(1) ?= $(defcfg-$($(1)_guest))
 
 cfg-default-deps := $(ROOT)/build/mkcfg.py $$(cfg-$(1)) $(TEST-EXTRA-CFG) FORCE