diff mbox

[PULL,01/35] rules.mak: Allow .mo-objs and .mo-cflags in -y variables

Message ID 1414776373-9704-2-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini Oct. 31, 2014, 5:25 p.m. UTC
From: Fam Zheng <famz@redhat.com>

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 <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 rules.mak | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/rules.mak b/rules.mak
index cf76b88..f500fef 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