File:  [Qemu by Fabrice Bellard] / qemu / scripts / create_config
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:42:41 2018 UTC (3 years, 4 months ago) by root
Branches: qemu, MAIN
CVS tags: qemu1001, qemu1000, qemu0151, qemu0150, qemu0141, qemu0140, HEAD
qemu 0.14.0

    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:  prefix=* | [a-z]*dir=*) # directory configuration
   17:     name=${line%=*}
   18:     value=${line#*=}
   19:     define_name=`echo $name | tr '[:lower:]' '[:upper:]'`
   20:     eval "define_value=\"$value\""
   21:     echo "#define CONFIG_QEMU_$define_name \"$define_value\""
   22:     # save for the next definitions
   23:     eval "$name=\$define_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:     ;;
   33:  CONFIG_BDRV_WHITELIST=*)
   34:     echo "#define CONFIG_BDRV_WHITELIST \\"
   35:     for drv in ${line#*=}; do
   36:       echo "    \"${drv}\",\\"
   37:     done
   38:     echo "    NULL"
   39:     ;;
   40:  CONFIG_*=y) # configuration
   41:     name=${line%=*}
   42:     echo "#define $name 1"
   43:     ;;
   44:  CONFIG_*=*) # configuration
   45:     name=${line%=*}
   46:     value=${line#*=}
   47:     echo "#define $name $value"
   48:     ;;
   49:  ARCH=*) # configuration
   50:     arch=${line#*=}
   51:     arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'`
   52:     echo "#define HOST_$arch_name 1"
   53:     ;;
   54:  HOST_USB=*)
   55:     # do nothing
   56:     ;;
   57:  HOST_CC=*)
   58:     # do nothing
   59:     ;;
   60:  HOST_*=y) # configuration
   61:     name=${line%=*}
   62:     echo "#define $name 1"
   63:     ;;
   64:  HOST_*=*) # configuration
   65:     name=${line%=*}
   66:     value=${line#*=}
   67:     echo "#define $name $value"
   68:     ;;
   69:  TARGET_ARCH=*) # configuration
   70:     target_arch=${line#*=}
   71:     echo "#define TARGET_ARCH \"$target_arch\""
   72:     ;;
   73:  TARGET_BASE_ARCH=*) # configuration
   74:     target_base_arch=${line#*=}
   75:     if [ "$target_base_arch" != "$target_arch" ]; then
   76:       base_arch_name=`echo $target_base_arch | tr '[:lower:]' '[:upper:]'`
   77:       echo "#define TARGET_$base_arch_name 1"
   78:     fi
   79:     ;;
   80:  TARGET_XML_FILES=*)
   81:     # do nothing
   82:     ;;
   83:  TARGET_ABI_DIR=*)
   84:     # do nothing
   85:     ;;
   86:  TARGET_ARCH2=*)
   87:     # do nothing
   88:     ;;
   89:  TARGET_DIRS=*)
   90:     # do nothing
   91:     ;;
   92:  TARGET_*=y) # configuration
   93:     name=${line%=*}
   94:     echo "#define $name 1"
   95:     ;;
   96:  TARGET_*=*) # configuration
   97:     name=${line%=*}
   98:     value=${line#*=}
   99:     echo "#define $name $value"
  100:     ;;
  101: esac
  102: 
  103: done # read

unix.superglobalmegacorp.com