scripts/functions
changeset 1094 c6a08b4c488c
parent 1083 88685bc8ae14
child 1101 29ebc048d33f
     1.1 --- a/scripts/functions	Fri Nov 28 23:33:04 2008 +0000
     1.2 +++ b/scripts/functions	Tue Dec 09 22:02:20 2008 +0000
     1.3 @@ -697,7 +697,22 @@
     1.4      CT_DoKernelTupleValues
     1.5  
     1.6      # Finish the target tuple construction
     1.7 -    CT_TARGET=$(CT_DoConfigSub "${CT_TARGET_ARCH}-${CT_TARGET_VENDOR:-unknown}-${CT_TARGET_KERNEL}${CT_TARGET_KERNEL:+-}${CT_TARGET_SYS}")
     1.8 +    CT_TARGET="${CT_TARGET_ARCH}-${CT_TARGET_VENDOR:-unknown}-${CT_TARGET_KERNEL}${CT_TARGET_KERNEL:+-}${CT_TARGET_SYS}"
     1.9 +
    1.10 +    # Sanity checks
    1.11 +    __sed_alias=""
    1.12 +    if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
    1.13 +        __sed_alias=$(echo "${CT_TARGET}" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
    1.14 +    fi
    1.15 +    case ":${CT_TARGET_VENDOR}:${CT_TARGET_ALIAS}:${__sed_alias}:" in
    1.16 +      :*" "*:*:*:) CT_Abort "Don't use spaces in the vendor string, it breaks things.";;
    1.17 +      :*"-"*:*:*:) CT_Abort "Don't use dashes in the vendor string, it breaks things.";;
    1.18 +      :*:*" "*:*:) CT_Abort "Don't use spaces in the target alias, it breaks things.";;
    1.19 +      :*:*:*" "*:) CT_Abort "Don't use spaces in the target sed transform, it breaks things.";;
    1.20 +    esac
    1.21 +
    1.22 +    # Canonicalise it
    1.23 +    CT_TARGET=$(CT_DoConfigSub "${CT_TARGET}")
    1.24  
    1.25      # Prepare the target CFLAGS
    1.26      CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_ENDIAN_CFLAG}"