aboutsummaryrefslogtreecommitdiff
path: root/create_config
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-07-16 18:34:20 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-16 17:28:58 -0500
commit42bc608b2a144dfa5141dd6ba5d12cb97ac804a7 (patch)
treeb34ac0b6756f584a9880a5691f88a8c28faafeec /create_config
parentf57975fb7d803b32af5d10831676401ce5f16970 (diff)
downloadqemu-42bc608b2a144dfa5141dd6ba5d12cb97ac804a7.zip
qemu-42bc608b2a144dfa5141dd6ba5d12cb97ac804a7.tar.gz
qemu-42bc608b2a144dfa5141dd6ba5d12cb97ac804a7.tar.bz2
Generate $target_dir/config.h from $target_dir/config.mak
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'create_config')
-rwxr-xr-xcreate_config55
1 files changed, 55 insertions, 0 deletions
diff --git a/create_config b/create_config
new file mode 100755
index 0000000..cac0edb
--- /dev/null
+++ b/create_config
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+echo "/* Automatically generated by configure - do not modify */"
+echo "#include \"../config-host.h\""
+
+while read line; do
+
+case $line in
+ CONFIG_*=y) # configuration
+ name=${line%=*}
+ echo "#define $name 1"
+ ;;
+ CONFIG_*=*) # configuration
+ name=${line%=*}
+ value=${line#*=}
+ echo "#define $name $value"
+ ;;
+ 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#*=}
+ if [ "$target_base_arch" != "$target_arch" ]; then
+ base_arch_name=`echo $target_base_arch | tr '[:lower:]' '[:upper:]'`
+ echo "#define TARGET_$base_arch_name 1"
+ fi
+ ;;
+ TARGET_XML_FILES=*)
+ # do nothing
+ ;;
+ TARGET_ABI_DIR=*)
+ # do nothing
+ ;;
+ TARGET_ARCH2=*)
+ # do nothing
+ ;;
+ TARGET_*=y) # configuration
+ name=${line%=*}
+ echo "#define $name 1"
+ ;;
+ TARGET_*=*) # configuration
+ name=${line%=*}
+ value=${line#*=}
+ echo "#define $name $value"
+ ;;
+ USE_NPTL=y) # configuration
+ name=${line%=*}
+ echo "#define $name 1"
+ ;;
+esac
+
+done # read