scripts/addToolVersion.sh
changeset 1692 068c809cc646
parent 1623 f935634ef900
child 1694 9f59ff8df12b
     1.1 --- a/scripts/addToolVersion.sh	Thu Nov 12 18:42:13 2009 +0100
     1.2 +++ b/scripts/addToolVersion.sh	Sat Jan 02 00:15:19 2010 +0100
     1.3 @@ -95,19 +95,21 @@
     1.4      [ -n "${exp_obs_prompt}" ] && SedExpr1="${SedExpr1}${exp_obs_prompt}"
     1.5      SedExpr1="${SedExpr1}\""
     1.6      [ -n "${deps}" ] && SedExpr1="${SedExpr1}\n${deps}"
     1.7 -    if [ "${tool}" = "gcc" ]; then
     1.8 -        # Extract 'M'ajor and 'm'inor from version string
     1.9 -        ver_M=$(echo "${version}...." |cut -d . -f 1)
    1.10 -        ver_m=$(echo "${version}...." |cut -d . -f 2)
    1.11 -        if [    ${ver_M} -gt 4                          \
    1.12 -             -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 3 \)  ]; then
    1.13 -            SedExpr1="${SedExpr1}\n    select CC_GCC_4_3_or_later"
    1.14 -        fi
    1.15 -        if [    ${ver_M} -gt 4                          \
    1.16 -             -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 4 \)  ]; then
    1.17 -            SedExpr1="${SedExpr1}\n    select CC_GCC_4_4_or_later"
    1.18 -        fi
    1.19 -    fi
    1.20 +    case "${tool}" in
    1.21 +        gcc)
    1.22 +            # Extract 'M'ajor and 'm'inor from version string
    1.23 +            ver_M=$(echo "${version}...." |cut -d . -f 1)
    1.24 +            ver_m=$(echo "${version}...." |cut -d . -f 2)
    1.25 +            if [    ${ver_M} -gt 4                          \
    1.26 +                 -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 3 \)  ]; then
    1.27 +                SedExpr1="${SedExpr1}\n    select CC_GCC_4_3_or_later"
    1.28 +            fi
    1.29 +            if [    ${ver_M} -gt 4                          \
    1.30 +                 -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 4 \)  ]; then
    1.31 +                SedExpr1="${SedExpr1}\n    select CC_GCC_4_4_or_later"
    1.32 +            fi
    1.33 +            ;;
    1.34 +    esac
    1.35      SedExpr2="    default \"${version}\" if ${cat}_V_${v}"
    1.36      "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_BELOW)$/\1\n\n'"${SedExpr1}"'/;' "${file}"
    1.37      "${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_STRING_BELOW)$/\1\n'"${SedExpr2}"'/;' "${file}"