scripts/build/binutils/binutils.sh
changeset 3089 3662412ddd59
parent 3032 712a8ed22762
child 3119 1c56c03b7ed5
     1.1 --- a/scripts/build/binutils/binutils.sh	Tue Aug 07 14:03:03 2012 +0800
     1.2 +++ b/scripts/build/binutils/binutils.sh	Thu Oct 11 14:39:41 2012 +1000
     1.3 @@ -4,13 +4,24 @@
     1.4  
     1.5  # Download binutils
     1.6  do_binutils_get() {
     1.7 -    CT_GetFile "binutils-${CT_BINUTILS_VERSION}"                                        \
     1.8 -               {ftp,http}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils   \
     1.9 -               ftp://gcc.gnu.org/pub/binutils/{releases,snapshots}
    1.10 +    if [ "${CT_BINUTILS_CUSTOM}" = "y" ]; then
    1.11 +        CT_GetCustom "binutils" "${CT_BINUTILS_VERSION}" \
    1.12 +                     "${CT_BINUTILS_CUSTOM_LOCATION}"
    1.13 +    else
    1.14 +        CT_GetFile "binutils-${CT_BINUTILS_VERSION}"                                        \
    1.15 +                   {ftp,http}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils   \
    1.16 +                   ftp://gcc.gnu.org/pub/binutils/{releases,snapshots}
    1.17 +    fi
    1.18  }
    1.19  
    1.20  # Extract binutils
    1.21  do_binutils_extract() {
    1.22 +    # If using custom directory location, nothing to do
    1.23 +    if [ "${CT_BINUTILS_CUSTOM}" = "y" \
    1.24 +         -a -d "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" ]; then
    1.25 +        return 0
    1.26 +    fi
    1.27 +
    1.28      CT_Extract "binutils-${CT_BINUTILS_VERSION}"
    1.29      CT_Patch "binutils" "${CT_BINUTILS_VERSION}"
    1.30  }