From: Fam Zheng Date: Tue, 28 Oct 2014 08:47:54 +0000 (+0800) Subject: rules.mak: Allow .mo-objs and .mo-cflags in -y variables X-Git-Tag: v2.2.0-rc0~15^2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d38853239ac17984e81fee169d80384784c6401;p=thirdparty%2Fqemu.git rules.mak: Allow .mo-objs and .mo-cflags in -y variables Expand %.mo-objs in -y nested objects, so that we can write combined object -cflags rules like what will be done in the coming patch. Signed-off-by: Fam Zheng Signed-off-by: Paolo Bonzini --- diff --git a/rules.mak b/rules.mak index cf76b88d265..f500fefdd15 100644 --- a/rules.mak +++ b/rules.mak @@ -362,4 +362,9 @@ define unnest-vars # Include all the .d files $(eval -include $(addsuffix *.d, $(sort $(dir $($v))))) $(eval $v := $(filter-out %/,$($v)))) + + # For all %.mo objects that are directly added into -y, expand them to %.mo-objs + $(foreach v,$2, + $(eval $v := $(foreach o,$($v),$(if $($o-objs),$($o-objs),$o)))) + endef