]> Git Repo - qemu.git/blob - create_config
lsi: Purge message queue on reset
[qemu.git] / create_config
1 #!/bin/sh
2
3 echo "/* Automatically generated by create_config - do not modify */"
4
5 while read line; do
6
7 case $line in
8  VERSION=*) # configuration
9     version=${line#*=}
10     echo "#define QEMU_VERSION \"$version\""
11     ;;
12  PKGVERSION=*) # configuration
13     pkgversion=${line#*=}
14     echo "#define QEMU_PKGVERSION \"$pkgversion\""
15     ;;
16  ARCH=*) # configuration
17     arch=${line#*=}
18     arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'`
19     echo "#define HOST_$arch_name 1"
20     ;;
21  CONFIG_AUDIO_DRIVERS=*)
22     drivers=${line#*=}
23     echo "#define CONFIG_AUDIO_DRIVERS \\"
24     for drv in $drivers; do
25       echo "    &${drv}_audio_driver,\\"
26     done
27     echo ""
28     ;;
29  CONFIG_BDRV_WHITELIST=*)
30     echo "#define CONFIG_BDRV_WHITELIST \\"
31     for drv in ${line#*=}; do
32       echo "    \"${drv}\",\\"
33     done
34     echo "    NULL"
35     ;;
36  CONFIG_*=y) # configuration
37     name=${line%=*}
38     echo "#define $name 1"
39     ;;
40  CONFIG_*=*) # configuration
41     name=${line%=*}
42     value=${line#*=}
43     echo "#define $name $value"
44     ;;
45  ARCH=*) # configuration
46     arch=${line#*=}
47     arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'`
48     echo "#define HOST_$arch_name 1"
49     ;;
50  HOST_USB=*)
51     # do nothing
52     ;;
53  HOST_CC=*)
54     # do nothing
55     ;;
56  HOST_*=y) # configuration
57     name=${line%=*}
58     echo "#define $name 1"
59     ;;
60  HOST_*=*) # configuration
61     name=${line%=*}
62     value=${line#*=}
63     echo "#define $name $value"
64     ;;
65  TARGET_ARCH=*) # configuration
66     target_arch=${line#*=}
67     echo "#define TARGET_ARCH \"$target_arch\""
68     ;;
69  TARGET_BASE_ARCH=*) # configuration
70     target_base_arch=${line#*=}
71     if [ "$target_base_arch" != "$target_arch" ]; then
72       base_arch_name=`echo $target_base_arch | tr '[:lower:]' '[:upper:]'`
73       echo "#define TARGET_$base_arch_name 1"
74     fi
75     ;;
76  TARGET_XML_FILES=*)
77     # do nothing
78     ;;
79  TARGET_ABI_DIR=*)
80     # do nothing
81     ;;
82  TARGET_ARCH2=*)
83     # do nothing
84     ;;
85  TARGET_DIRS=*)
86     # do nothing
87     ;;
88  TARGET_*=y) # configuration
89     name=${line%=*}
90     echo "#define $name 1"
91     ;;
92  TARGET_*=*) # configuration
93     name=${line%=*}
94     value=${line#*=}
95     echo "#define $name $value"
96     ;;
97 esac
98
99 done # read
This page took 0.029135 seconds and 4 git commands to generate.