Revert "spapr: Ensure CPU cores are added contiguously and removed in LIFO order"
[qemu.git] / scripts / create_config
blob1dd6a354f530d9b2cd526818f67961bd3d60dcbc
1 #!/bin/sh
3 echo "/* Automatically generated by create_config - do not modify */"
5 while read line; do
7 case $line in
8 VERSION=*) # configuration
9 version=${line#*=}
10 echo "#define QEMU_VERSION \"$version\""
12 qemu_*dir=*) # qemu-specific directory configuration
13 name=${line%=*}
14 value=${line#*=}
15 define_name=$(echo $name | LC_ALL=C tr '[a-z]' '[A-Z]')
16 eval "define_value=\"$value\""
17 echo "#define CONFIG_$define_name \"$define_value\""
18 # save for the next definitions
19 eval "$name=\$define_value"
21 prefix=*)
22 # save for the next definitions
23 prefix=${line#*=}
25 IASL=*) # iasl executable
26 value=${line#*=}
27 echo "#define CONFIG_IASL $value"
29 CONFIG_AUDIO_DRIVERS=*)
30 drivers=${line#*=}
31 echo "#define CONFIG_AUDIO_DRIVERS \\"
32 for drv in $drivers; do
33 echo " &${drv}_audio_driver,\\"
34 done
35 echo ""
37 CONFIG_BDRV_RW_WHITELIST=*)
38 echo "#define CONFIG_BDRV_RW_WHITELIST\\"
39 for drv in ${line#*=}; do
40 echo " \"${drv}\",\\"
41 done
42 echo " NULL"
44 CONFIG_BDRV_RO_WHITELIST=*)
45 echo "#define CONFIG_BDRV_RO_WHITELIST\\"
46 for drv in ${line#*=}; do
47 echo " \"${drv}\",\\"
48 done
49 echo " NULL"
51 CONFIG_*='$(CONFIG_SOFTMMU)'|CONFIG_*=y) # configuration
52 name=${line%=*}
53 echo "#define $name 1"
55 CONFIG_*=*) # configuration
56 name=${line%=*}
57 value=${line#*=}
58 echo "#define $name $value"
60 HAVE_*=y) # configuration
61 name=${line%=*}
62 echo "#define $name 1"
64 HAVE_*=*) # configuration
65 name=${line%=*}
66 value=${line#*=}
67 echo "#define $name $value"
69 ARCH=*) # configuration
70 arch=${line#*=}
71 arch_name=$(echo $arch | LC_ALL=C tr '[a-z]' '[A-Z]')
72 echo "#define HOST_$arch_name 1"
74 HOST_USB=*)
75 # do nothing
77 HOST_CC=*)
78 # do nothing
80 HOST_*=y) # configuration
81 name=${line%=*}
82 echo "#define $name 1"
84 HOST_*=*) # configuration
85 name=${line%=*}
86 value=${line#*=}
87 echo "#define $name $value"
89 TARGET_BASE_ARCH=*) # configuration
90 target_base_arch=${line#*=}
91 base_arch_name=$(echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]')
92 echo "#define TARGET_$base_arch_name 1"
94 TARGET_XML_FILES=*)
95 # do nothing
97 TARGET_ABI_DIR=*)
98 # do nothing
100 TARGET_NAME=*)
101 target_name=${line#*=}
102 echo "#define TARGET_NAME \"$target_name\""
104 TARGET_DIRS=*)
105 # do nothing
107 TARGET_*=y) # configuration
108 name=${line%=*}
109 echo "#define $name 1"
111 TARGET_*=*) # configuration
112 name=${line%=*}
113 value=${line#*=}
114 echo "#define $name $value"
116 DSOSUF=*)
117 echo "#define HOST_DSOSUF \"${line#*=}\""
119 esac
121 done # read