__sparc_*__ is defined through -D__sparc_*__
[qemu] / create_config
1 #!/bin/sh
2
3 while read line; do
4
5 case $line in
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     ;;
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     ;;
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     ;;
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     ;;
56  TARGET_ARCH=*) # configuration
57     target_arch=${line#*=}
58     arch_name=`echo $target_arch | tr '[:lower:]' '[:upper:]'`
59     echo "#define TARGET_ARCH \"$target_arch\""
60     echo "#define TARGET_$arch_name 1"
61     ;;
62  TARGET_BASE_ARCH=*) # configuration
63     target_base_arch=${line#*=}
64     if [ "$target_base_arch" != "$target_arch" ]; then
65       base_arch_name=`echo $target_base_arch | tr '[:lower:]' '[:upper:]'`
66       echo "#define TARGET_$base_arch_name 1"
67     fi
68     ;;
69  TARGET_XML_FILES=*)
70     # do nothing
71     ;;
72  TARGET_ABI_DIR=*)
73     # do nothing
74     ;;
75  TARGET_ARCH2=*)
76     # do nothing
77     ;;
78  TARGET_DIRS=*)
79     # do nothing
80     ;;
81  TARGET_*=y) # configuration
82     name=${line%=*}
83     echo "#define $name 1"
84     ;;
85  TARGET_*=*) # configuration
86     name=${line%=*}
87     value=${line#*=}
88     echo "#define $name $value"
89     ;;
90 esac
91
92 done # read