binutils/elf2flt: Add CUSTOM version, CUSTOM_LOCATION config options, GetCustom
authorDavid Holsgrove <david.holsgrove@xilinx.com>
Thu Oct 11 14:39:42 2012 +1000 (2012-10-11)
changeset 3090a221c86d9b33
parent 3089 3662412ddd59
child 3091 41967d32b54e
binutils/elf2flt: Add CUSTOM version, CUSTOM_LOCATION config options, GetCustom

CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Change elf2flt CT_ELF2FLT_VERSION from 'head' to 'cvs' if cvs selected in config

Also remove hardcoded 'cvs-' from elf2flt component name, used in CT_Extract,
CT_Patch and as the CT_SRC_DIR location for the configure stage.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation, don't patch custom dir location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <288db3721a37844defa5.1349931196@localhost.localdomain>
PatchWork-Id: 190789
config/binutils/elf2flt.in
scripts/build/binutils/elf2flt.sh
     1.1 --- a/config/binutils/elf2flt.in	Thu Oct 11 14:39:41 2012 +1000
     1.2 +++ b/config/binutils/elf2flt.in	Thu Oct 11 14:39:42 2012 +1000
     1.3 @@ -20,8 +20,26 @@
     1.4      bool
     1.5      prompt "CVS Snapshot"
     1.6  
     1.7 +config ELF2FLT_CUSTOM
     1.8 +    bool
     1.9 +    prompt "Custom elf2flt"
    1.10 +    depends on EXPERIMENTAL
    1.11 +
    1.12  endchoice
    1.13  
    1.14 +if ELF2FLT_CUSTOM
    1.15 +
    1.16 +config ELF2FLT_CUSTOM_LOCATION
    1.17 +    string
    1.18 +    prompt "Full path to custom elf2flt source"
    1.19 +    default ""
    1.20 +    help
    1.21 +      Enter the path to the directory (or tarball) of your source for elf2flt,
    1.22 +      or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/elf2flt
    1.23 +
    1.24 +endif # ELF2FLT_CUSTOM
    1.25 +if ! ELF2FLT_CUSTOM
    1.26 +
    1.27  config ELF2FLT_CVS_SNAPSHOT_SPEC
    1.28      string
    1.29      depends on ELF2FLT_CVS_SNAPSHOT
    1.30 @@ -31,9 +49,12 @@
    1.31         What you enter here will be passed verbatim to the cvs checkout command
    1.32         so be careful!
    1.33  
    1.34 +endif # ! ELF2FLT_CUSTOM
    1.35 +
    1.36  config ELF2FLT_VERSION
    1.37      string
    1.38 -    default "head" if ELF2FLT_CVSHEAD
    1.39 +    default "cvs" if ELF2FLT_CVSHEAD
    1.40 +    default "custom" if ELF2FLT_CUSTOM
    1.41  # Don't remove next line
    1.42  # CT_INSERT_VERSION_STRING_BELOW
    1.43  
     2.1 --- a/scripts/build/binutils/elf2flt.sh	Thu Oct 11 14:39:41 2012 +1000
     2.2 +++ b/scripts/build/binutils/elf2flt.sh	Thu Oct 11 14:39:42 2012 +1000
     2.3 @@ -13,17 +13,27 @@
     2.4  
     2.5  # Download elf2flt
     2.6  do_elf2flt_get() {
     2.7 -    CT_GetCVS "elf2flt-cvs-${CT_ELF2FLT_VERSION}"           \
     2.8 -              ":pserver:anonymous@cvs.uclinux.org:/var/cvs" \
     2.9 -              "elf2flt"                                     \
    2.10 -              "" \
    2.11 -              "elf2flt-cvs-${CT_ELF2FLT_VERSION}"
    2.12 +    if [ "${CT_ELF2FLT_CUSTOM}" = "y" ]; then
    2.13 +        CT_GetCustom "elf2flt" "${ELF2FLT_VERSION}" \
    2.14 +                     "${CT_ELF2FLT_CUSTOM_LOCATION}"
    2.15 +    else
    2.16 +        CT_GetCVS "elf2flt-${CT_ELF2FLT_VERSION}"               \
    2.17 +                  ":pserver:anonymous@cvs.uclinux.org:/var/cvs" \
    2.18 +                  "elf2flt"                                     \
    2.19 +                  "" \
    2.20 +                  "elf2flt-${CT_ELF2FLT_VERSION}"
    2.21 +    fi
    2.22  }
    2.23  
    2.24  # Extract elf2flt
    2.25  do_elf2flt_extract() {
    2.26 -    CT_Extract "elf2flt-cvs-${CT_ELF2FLT_VERSION}"
    2.27 -    CT_Patch "elf2flt-cvs" "${CT_ELF2FLT_VERSION}"
    2.28 +    # If using custom directory location, nothing to do
    2.29 +    if [    "${CT_ELF2FLT_CUSTOM}" = "y" \
    2.30 +         -a -d "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}" ]; then
    2.31 +        return 0
    2.32 +    fi
    2.33 +    CT_Extract "elf2flt-${CT_ELF2FLT_VERSION}"
    2.34 +    CT_Patch "elf2flt" "${CT_ELF2FLT_VERSION}"
    2.35  }
    2.36  
    2.37  # Build elf2flt for build -> target
    2.38 @@ -111,7 +121,7 @@
    2.39      CT_DoLog EXTRA "Configuring elf2flt"
    2.40      CT_DoExecLog CFG                                            \
    2.41      CFLAGS="${host_cflags}"                                     \
    2.42 -    "${CT_SRC_DIR}/elf2flt-cvs-${CT_ELF2FLT_VERSION}/configure" \
    2.43 +    "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}/configure"     \
    2.44          --build=${CT_BUILD}                                     \
    2.45          --host=${host}                                          \
    2.46          --target=${CT_TARGET}                                   \