]> git.proxmox.com Git - qemu.git/blame - create_config
eliminate errors about unused results in block/vpc.c
[qemu.git] / create_config
CommitLineData
42bc608b
JQ
1#!/bin/sh
2
42bc608b
JQ
3while read line; do
4
5case $line in
2358a494
JQ
6 VERSION=*) # configuration
7 version=${line#*=}
8 echo "#define QEMU_VERSION \"$version\""
9 ;;
10 PKGVERSION=*) # configuration
11 pkgversion=${line#*=}
12 echo "#define QEMU_PKGVERSION \"$pkgversion\""
13 ;;
14 ARCH=*) # configuration
15 arch=${line#*=}
16 arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'`
17 echo "#define HOST_$arch_name 1"
18 ;;
2358a494
JQ
19 CONFIG_AUDIO_DRIVERS=*)
20 drivers=${line#*=}
21 echo "#define CONFIG_AUDIO_DRIVERS \\"
22 for drv in $drivers; do
23 echo " &${drv}_audio_driver,\\"
24 done
25 echo ""
26 ;;
42bc608b
JQ
27 CONFIG_*=y) # configuration
28 name=${line%=*}
29 echo "#define $name 1"
30 ;;
31 CONFIG_*=*) # configuration
32 name=${line%=*}
33 value=${line#*=}
34 echo "#define $name $value"
35 ;;
2358a494
JQ
36 ARCH=*) # configuration
37 arch=${line#*=}
38 arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'`
39 echo "#define HOST_$arch_name 1"
40 ;;
41 HOST_USB=*)
42 # do nothing
43 ;;
44 HOST_CC=*)
45 # do nothing
46 ;;
47 HOST_*=y) # configuration
48 name=${line%=*}
49 echo "#define $name 1"
50 ;;
51 HOST_*=*) # configuration
52 name=${line%=*}
53 value=${line#*=}
54 echo "#define $name $value"
55 ;;
42bc608b
JQ
56 TARGET_ARCH=*) # configuration
57 target_arch=${line#*=}
42bc608b 58 echo "#define TARGET_ARCH \"$target_arch\""
42bc608b
JQ
59 ;;
60 TARGET_BASE_ARCH=*) # configuration
61 target_base_arch=${line#*=}
62 if [ "$target_base_arch" != "$target_arch" ]; then
63 base_arch_name=`echo $target_base_arch | tr '[:lower:]' '[:upper:]'`
64 echo "#define TARGET_$base_arch_name 1"
65 fi
66 ;;
67 TARGET_XML_FILES=*)
68 # do nothing
69 ;;
70 TARGET_ABI_DIR=*)
71 # do nothing
72 ;;
73 TARGET_ARCH2=*)
74 # do nothing
75 ;;
2358a494
JQ
76 TARGET_DIRS=*)
77 # do nothing
78 ;;
42bc608b
JQ
79 TARGET_*=y) # configuration
80 name=${line%=*}
81 echo "#define $name 1"
82 ;;
83 TARGET_*=*) # configuration
84 name=${line%=*}
85 value=${line#*=}
86 echo "#define $name $value"
87 ;;
42bc608b
JQ
88esac
89
90done # read