From: Olaf Hering Subject: [PATCH 14/46] Config.mk: add new macro buildmakevars2header Date: Mon, 22 Sep 2014 15:00:03 +0200 Message-ID: <1411390835-7348-15-git-send-email-olaf@aepfle.de> References: <1411390835-7348-1-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411390835-7348-1-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Olaf Hering , Keir Fraser , David Scott , Stefano Stabellini , George Dunlap , Tim Deegan , Ian Jackson , Jan Beulich , Samuel Thibault , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- 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