~vcs-imports/qemu/git

« back to all changes in this revision

Viewing changes to create_config

  • Committer: Anthony Liguori
  • Author(s): Juan Quintela
  • Date: 2009-07-27 19:10:55 UTC
  • Revision ID: git-v1:2358a4940b7f9b863fa8084960f40517985df8c1
Generate config-host.h from config-host.mak

Generate CONFIG_AUDIO_DRIVERS.  Order is important here, because the
first driver in the list is the one used by default.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
3
 
echo "/* Automatically generated by configure - do not modify */"
4
 
echo "#include \"../config-host.h\""
5
 
 
6
3
while read line; do
7
4
 
8
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__sparc_*=y) # configuration
 
20
    name=${line%=*}
 
21
    name=${name#CONFIG}
 
22
    value=${line#*=}
 
23
    echo "#define $name $value"
 
24
    ;;
 
25
 CONFIG_AUDIO_DRIVERS=*)
 
26
    drivers=${line#*=}
 
27
    echo "#define CONFIG_AUDIO_DRIVERS \\"
 
28
    for drv in $drivers; do
 
29
      echo "    &${drv}_audio_driver,\\"
 
30
    done
 
31
    echo ""
 
32
    ;;
9
33
 CONFIG_*=y) # configuration
10
34
    name=${line%=*}
11
35
    echo "#define $name 1"
15
39
    value=${line#*=}
16
40
    echo "#define $name $value"
17
41
    ;;
 
42
 ARCH=*) # configuration
 
43
    arch=${line#*=}
 
44
    arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'`
 
45
    echo "#define HOST_$arch_name 1"
 
46
    ;;
 
47
 HOST_USB=*)
 
48
    # do nothing
 
49
    ;;
 
50
 HOST_CC=*)
 
51
    # do nothing
 
52
    ;;
 
53
 HOST_*=y) # configuration
 
54
    name=${line%=*}
 
55
    echo "#define $name 1"
 
56
    ;;
 
57
 HOST_*=*) # configuration
 
58
    name=${line%=*}
 
59
    value=${line#*=}
 
60
    echo "#define $name $value"
 
61
    ;;
18
62
 TARGET_ARCH=*) # configuration
19
63
    target_arch=${line#*=}
20
64
    arch_name=`echo $target_arch | tr '[:lower:]' '[:upper:]'`
37
81
 TARGET_ARCH2=*)
38
82
    # do nothing
39
83
    ;;
 
84
 TARGET_DIRS=*)
 
85
    # do nothing
 
86
    ;;
40
87
 TARGET_*=y) # configuration
41
88
    name=${line%=*}
42
89
    echo "#define $name 1"