[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 6/6] Generate $target_dir/config.h from $target_dir/
From: |
quintela |
Subject: |
[Qemu-devel] [PATCH 6/6] Generate $target_dir/config.h from $target_dir/config.mak |
Date: |
Wed, 15 Jul 2009 17:26:34 +0200 |
From: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
create_config | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
create mode 100755 create_config
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
--
1.6.2.5
- [Qemu-devel] [RFC PATCH 0/6] Generate config_h from config.mak, quintela, 2009/07/15
- [Qemu-devel] [PATCH 2/6] simplify TARGET_ARCH2 generation, quintela, 2009/07/15
- [Qemu-devel] [PATCH 3/6] simplify TARGET_ABI_DIR generation, quintela, 2009/07/15
- [Qemu-devel] [PATCH 4/6] rename s/config_mak/config_host_mak/ and s/config_h/config_host_h/, quintela, 2009/07/15
- [Qemu-devel] [PATCH 5/6] Refactor config_softfloat selection in another list, quintela, 2009/07/15
- [Qemu-devel] [PATCH 6/6] Generate $target_dir/config.h from $target_dir/config.mak,
quintela <=
- [Qemu-devel] [PATCH 1/6] simplify TARGET_BASE_ARCH generation, quintela, 2009/07/15