]> git.proxmox.com Git - qemu.git/blobdiff - create_config
pci: fix bridge update
[qemu.git] / create_config
index 9dcbc5f094f855118740139d852e566837056f52..0098e683e20c9b7c600f712d0d6d6cf50f37517e 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+echo "/* Automatically generated by create_config - do not modify */"
+
 while read line; do
 
 case $line in
@@ -11,10 +13,14 @@ case $line in
     pkgversion=${line#*=}
     echo "#define QEMU_PKGVERSION \"$pkgversion\""
     ;;
- ARCH=*) # configuration
-    arch=${line#*=}
-    arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'`
-    echo "#define HOST_$arch_name 1"
+ prefix=* | [a-z]*dir=*) # directory configuration
+    name=${line%=*}
+    value=${line#*=}
+    define_name=`echo $name | tr '[:lower:]' '[:upper:]'`
+    eval "define_value=\"$value\""
+    echo "#define CONFIG_QEMU_$define_name \"$define_value\""
+    # save for the next definitions
+    eval "$name=\$define_value"
     ;;
  CONFIG_AUDIO_DRIVERS=*)
     drivers=${line#*=}
@@ -24,6 +30,13 @@ case $line in
     done
     echo ""
     ;;
+ CONFIG_BDRV_WHITELIST=*)
+    echo "#define CONFIG_BDRV_WHITELIST \\"
+    for drv in ${line#*=}; do
+      echo "    \"${drv}\",\\"
+    done
+    echo "    NULL"
+    ;;
  CONFIG_*=y) # configuration
     name=${line%=*}
     echo "#define $name 1"
@@ -55,9 +68,7 @@ case $line in
     ;;
  TARGET_ARCH=*) # configuration
     target_arch=${line#*=}
-    arch_name=`echo $target_arch | tr '[:lower:]' '[:upper:]'`
     echo "#define TARGET_ARCH \"$target_arch\""
-    echo "#define TARGET_$arch_name 1"
     ;;
  TARGET_BASE_ARCH=*) # configuration
     target_base_arch=${line#*=}