Makefile: generate header file with the list of devices enabled

v2: generate config-devices.h which contains the list of devices enabled

Message-Id: <20190705143554.10295-1-julio.montes@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
Julio Montes 2019-07-05 14:35:53 +00:00 committed by Paolo Bonzini
parent ec7b1bbd2c
commit 6c22ea9d83
2 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,9 @@ include $(SRC_PATH)/tests/tcg/Makefile.include
config-target.h: config-target.h-timestamp
config-target.h-timestamp: config-target.mak
config-devices.h: config-devices.h-timestamp
config-devices.h-timestamp: config-devices.mak
ifdef CONFIG_TRACE_SYSTEMTAP
stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp $(QEMU_PROG)-simpletrace.stp $(QEMU_PROG)-log.stp
@ -168,6 +171,7 @@ obj-y += hw/$(TARGET_BASE_ARCH)/
endif
generated-files-y += hmp-commands.h hmp-commands-info.h
generated-files-y += config-devices.h
endif # CONFIG_SOFTMMU

View File

@ -58,6 +58,8 @@ case $line in
name=${line%=*}
echo "#define $name 1"
;;
CONFIG_*=n) # configuration
;;
CONFIG_*=*) # configuration
name=${line%=*}
value=${line#*=}