]> git.proxmox.com Git - mirror_qemu.git/commitdiff
build: enable using $(CONFIG_FOO) on the rhs of config files
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 3 Apr 2013 15:53:21 +0000 (17:53 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 8 Apr 2013 16:13:10 +0000 (18:13 +0200)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Makefile

index 80344d9436c5b4613e7e14fb5b57480efc3019d0..0b6e6a137fbd5831c0e65b4294d6e46136f453d4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,10 @@ config-all-devices.mak:
        $(call quiet-command,echo '# no devices' > $@,"  GEN   $@")
 else
 config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
-       $(call quiet-command,cat $(SUBDIR_DEVICES_MAK) | grep =y | sort -u > $@,"  GEN   $@")
+       $(call quiet-command, sed -n \
+             's|^\([^=]*\)=\(.*\)$$|\1:=$$(findstring y,$$(\1)\2)|p' \
+             $(SUBDIR_DEVICES_MAK) | sort -u > $@, \
+             "  GEN   $@")
 endif
 
 -include $(SUBDIR_DEVICES_MAK_DEP)