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