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

[Xen-devel] [PATCH 14/46] Config.mk: add new macro buildmakevars2header



This macro is similar to buildmakevars2file, it just creates a C header
file instead of shell style syntax. Upcoming changes will use this macro
in libxl and libxc.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 Config.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Config.mk b/Config.mk
index 64982c6..4c3a2a7 100644
--- a/Config.mk
+++ b/Config.mk
@@ -179,6 +179,15 @@ define buildmakevars2file-closure
        $(call move-if-changed,$(1).tmp,$(1))
 endef
 
+buildmakevars2header = $(eval $(call buildmakevars2header-closure,$(1)))
+define buildmakevars2header-closure
+    $(1): .phony
+       rm -f $(1).tmp; \
+       $(foreach var, $(BUILD_MAKE_VARS), \
+                 echo "#define $(var) \"$($(var))\"" >>$(1).tmp;) \
+       $(call move-if-changed,$(1).tmp,$(1))
+endef
+
 ifeq ($(debug_symbols),y)
 CFLAGS += -g
 endif

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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