scripts/build/binutils/sstrip.sh
changeset 1856 e23ffb5c7928
parent 1854 02b74bd4373f
child 1858 43d14939d956
     1.1 --- a/scripts/build/binutils/sstrip.sh	Wed Mar 17 00:21:57 2010 +0100
     1.2 +++ b/scripts/build/binutils/sstrip.sh	Wed Mar 17 00:28:14 2010 +0100
     1.3 @@ -4,57 +4,32 @@
     1.4  do_tools_sstrip_extract() { :; }
     1.5  do_tools_sstrip() { :; }
     1.6  
     1.7 -case "${CT_SSTRIP_FROM}" in
     1.8 -    ELFkickers)
     1.9 -        do_sstrip_get() {
    1.10 -            CT_GetFile "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"     \
    1.11 -                       http://www.muppetlabs.com/~breadbox/pub/software
    1.12 -        }
    1.13 -        do_sstrip_extract() {
    1.14 -            CT_Extract "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
    1.15 -            CT_Patch "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
    1.16 -        }
    1.17 -        do_sstrip() {
    1.18 -            CT_DoStep INFO "Installing sstrip"
    1.19 -            CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip"   \
    1.20 -                                    "${CT_BUILD_DIR}/build-strip"
    1.21 -            cd "${CT_BUILD_DIR}/build-strip"
    1.22 +if [ "${CT_SSTRIP}" = "y" ]; then
    1.23 +    do_sstrip_get() {
    1.24 +        CT_GetFile sstrip .c http://git.buildroot.net/buildroot/plain/toolchain/sstrip
    1.25 +    }
    1.26  
    1.27 -            CT_DoLog EXTRA "Building sstrip"
    1.28 -            CT_DoExecLog ALL make CC="${CT_HOST}-gcc" sstrip
    1.29 -            
    1.30 -            CT_DoLog EXTRA "Installing sstrip"
    1.31 -            CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
    1.32 +    do_sstrip_extract() {
    1.33 +        # We leave the sstrip maintenance to the buildroot people:
    1.34 +        # -> any fix-up goes directly there
    1.35 +        # -> we don't have patches for it
    1.36 +        # -> we don't need to patch it
    1.37 +        # -> just create a directory in src/, and copy it there.
    1.38 +        CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/sstrip"
    1.39 +        CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
    1.40 +    }
    1.41  
    1.42 -            CT_EndStep
    1.43 -        }
    1.44 -    ;;
    1.45 +    do_sstrip() {
    1.46 +        CT_DoStep INFO "Installing sstrip"
    1.47 +        mkdir -p "${CT_BUILD_DIR}/build-sstrip"
    1.48 +        cd "${CT_BUILD_DIR}/build-sstrip"
    1.49  
    1.50 -    buildroot)
    1.51 -        do_sstrip_get() {
    1.52 -            CT_GetFile sstrip .c http://git.buildroot.net/buildroot/plain/toolchain/sstrip
    1.53 -        }
    1.54 -        do_sstrip_extract() {
    1.55 -            # We leave the sstrip maintenance to the buildroot people:
    1.56 -            # -> any fix-up goes directly there
    1.57 -            # -> we don't have patches for it
    1.58 -            # -> we don't need to patch it
    1.59 -            # -> just create a directory in src/, and copy it there.
    1.60 -            CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/sstrip"
    1.61 -            CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
    1.62 -        }
    1.63 -        do_sstrip() {
    1.64 -            CT_DoStep INFO "Installing sstrip"
    1.65 -            mkdir -p "${CT_BUILD_DIR}/build-sstrip"
    1.66 -            cd "${CT_BUILD_DIR}/build-sstrip"
    1.67 +        CT_DoLog EXTRA "Building sstrip"
    1.68 +        CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
    1.69  
    1.70 -            CT_DoLog EXTRA "Building sstrip"
    1.71 -            CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
    1.72 +        CT_DoLog EXTRA "Installing sstrip"
    1.73 +        CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
    1.74  
    1.75 -            CT_DoLog EXTRA "Installing sstrip"
    1.76 -            CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
    1.77 -
    1.78 -            CT_EndStep
    1.79 -        }
    1.80 -    ;;
    1.81 -esac
    1.82 +        CT_EndStep
    1.83 +    }
    1.84 +fi