summaryrefslogtreecommitdiff
path: root/create_config
blob: 8b7b365d7fc564450175bb06374a847e29251864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/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"
    ;;
esac

done # read