[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MINI-OS PATCH 11/19] mini-os: config: add support for config items with numerical values



Add support for a Mini-OS config file containing config items with
numerical values, e.g. CONFIG_FOO=7.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
 Config.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Config.mk b/Config.mk
index e2afb1b4..b9675e61 100644
--- a/Config.mk
+++ b/Config.mk
@@ -178,6 +178,7 @@ endif
 # CONFIG-y contains all items defaulting to "y"
 # CONFIG-n contains all items defaulting to "n"
 # CONFIG-x contains all items being calculated if not set explicitly
+# CONFIG-val-y contains all items with numerical values, defaulting to 0
 CONFIG-y += CONFIG_START_NETWORK
 CONFIG-y += CONFIG_SPARSE_BSS
 CONFIG-y += CONFIG_BLKFRONT
@@ -219,6 +220,8 @@ CONFIG-$(lwip) += CONFIG_LWIP
 $(foreach i,$(CONFIG-y),$(eval $(i) ?= y))
 $(foreach i,$(CONFIG-n),$(eval $(i) ?= n))
 
+$(foreach i,$(CONFIG-val-y),$(eval $(i) ?= 0))
+
 CONFIG-x += CONFIG_LIBXS
 CONFIG_LIBXS ?= $(CONFIG_XENBUS)
 
@@ -226,6 +229,7 @@ CONFIG-all := $(CONFIG-y) $(CONFIG-n) $(CONFIG-x)
 
 # Export config items as compiler directives
 $(foreach i,$(CONFIG-all),$(eval DEFINES-$($(i)) += -D$(i)))
+$(foreach i,$(CONFIG-val-y),$(eval DEFINES-y += -D$(i)=$($(i))))
 
 DEFINES-y += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
 
-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.