vvfat: set status to odd fixes
[qemu/ar7.git] / scripts / create_config
blob6d8f08b39daea1e2f0654f83d4fd1e599068ddeb
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 major=$(echo "$version" | cut -d. -f1)
11 minor=$(echo "$version" | cut -d. -f2)
12 micro=$(echo "$version" | cut -d. -f3)
13 echo "#define QEMU_VERSION \"$version\""
14 echo "#define QEMU_VERSION_MAJOR $major"
15 echo "#define QEMU_VERSION_MINOR $minor"
16 echo "#define QEMU_VERSION_MICRO $micro"
18 qemu_*dir=* | qemu_*path=*) # qemu-specific directory configuration
19 name=${line%=*}
20 value=${line#*=}
21 define_name=$(echo $name | LC_ALL=C tr '[a-z]' '[A-Z]')
22 eval "define_value=\"$value\""
23 echo "#define CONFIG_$define_name \"$define_value\""
24 # save for the next definitions
25 eval "$name=\$define_value"
27 prefix=*)
28 # save for the next definitions
29 prefix=${line#*=}
31 IASL=*) # iasl executable
32 value=${line#*=}
33 echo "#define CONFIG_IASL $value"
35 CONFIG_AUDIO_DRIVERS=*)
36 drivers=${line#*=}
37 echo "#define CONFIG_AUDIO_DRIVERS \\"
38 for drv in $drivers; do
39 echo " \"${drv}\",\\"
40 done
41 echo ""
43 CONFIG_BDRV_RW_WHITELIST=*)
44 echo "#define CONFIG_BDRV_RW_WHITELIST\\"
45 for drv in ${line#*=}; do
46 echo " \"${drv}\",\\"
47 done
48 echo " NULL"
50 CONFIG_BDRV_RO_WHITELIST=*)
51 echo "#define CONFIG_BDRV_RO_WHITELIST\\"
52 for drv in ${line#*=}; do
53 echo " \"${drv}\",\\"
54 done
55 echo " NULL"
57 CONFIG_*=y) # configuration
58 name=${line%=*}
59 echo "#define $name 1"
61 CONFIG_*=n) # configuration
63 CONFIG_*=*) # configuration
64 name=${line%=*}
65 value=${line#*=}
66 echo "#define $name $value"
68 HAVE_*=y) # configuration
69 name=${line%=*}
70 echo "#define $name 1"
72 HAVE_*=*) # configuration
73 name=${line%=*}
74 value=${line#*=}
75 echo "#define $name $value"
77 ARCH=*) # configuration
78 arch=${line#*=}
79 arch_name=$(echo $arch | LC_ALL=C tr '[a-z]' '[A-Z]')
80 echo "#define HOST_$arch_name 1"
82 HOST_USB=*)
83 # do nothing
85 HOST_CC=*)
86 # do nothing
88 HOST_*=y) # configuration
89 name=${line%=*}
90 echo "#define $name 1"
92 HOST_*=*) # configuration
93 name=${line%=*}
94 value=${line#*=}
95 echo "#define $name $value"
97 TARGET_BASE_ARCH=*) # configuration
98 target_base_arch=${line#*=}
99 base_arch_name=$(echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]')
100 echo "#define TARGET_$base_arch_name 1"
102 TARGET_XML_FILES=*)
103 # do nothing
105 TARGET_ABI_DIR=*)
106 # do nothing
108 TARGET_NAME=*)
109 target_name=${line#*=}
110 echo "#define TARGET_NAME \"$target_name\""
112 TARGET_DIRS=*)
113 # do nothing
115 TARGET_*=y) # configuration
116 name=${line%=*}
117 echo "#define $name 1"
119 TARGET_*=*) # configuration
120 name=${line%=*}
121 value=${line#*=}
122 echo "#define $name $value"
124 DSOSUF=*)
125 echo "#define HOST_DSOSUF \"${line#*=}\""
127 esac
129 done # read