scripts/build/tools/200-sstrip.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jan 04 22:17:53 2009 +0000 (2009-01-04)
changeset 1123 8c5881324a79
parent 1041 2573519c00d6
child 1126 1ab3d2e08c8b
permissions -rw-r--r--
Get rid of CT_LIBC_FILE, remove useless CT_MakeAbsolutePath.

CT_LIBC_FILE:
- that one was not easy, as it had sneaked into CT_ExtractAndPatch
- which in turn made CT_ExtractAndPatch have references to C library addons
- which in turn relieved the C library _extract functions from doing their own job
- which in turn imposed some nasty tricks in CT_ExtractAndPatch
- which in turn made life easier for the DUMA _get and _extract functions
- which unveiled some bizare behavior for pushd and popd:
- if using smthg ike: 'pushd foo |bar':
- the directory is *neither* changed
- *nor* is it pushed onto the stack
- which made popd fail

CT_MakeAbsolutePath:
- used only to make CT_LOCAL_TARBALLS_DIR canonical
- which is ((almost) useless:
- hopefully, the user entered a full path already
- if it's not the case, too bad...

/trunk/scripts/build/debug/200-duma.sh | 5 1 4 0 +--
/trunk/scripts/build/libc/glibc.sh | 61 32 29 0 +++++++++++++++++---------------
/trunk/scripts/build/libc/uClibc.sh | 16 10 6 0 +++++---
/trunk/scripts/build/libc/eglibc.sh | 48 26 22 0 ++++++++++++++-----------
/trunk/scripts/crosstool.sh | 8 0 8 0 ----
/trunk/scripts/functions | 77 15 62 0 ++++++++--------------------------------
6 files changed, 84 insertions(+), 131 deletions(-)
     1 # This will build and install sstrip to run on host and sstrip target files
     2 
     3 case "${CT_SSTRIP_FROM}" in
     4     ELFkickers)
     5         do_tools_sstrip_get() {
     6             CT_GetFile "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"     \
     7                        http://www.muppetlabs.com/~breadbox/pub/software
     8         }
     9         do_tools_sstrip_extract() {
    10             CT_ExtractAndPatch "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
    11         }
    12         do_tools_sstrip_build() {
    13             CT_DoStep INFO "Installing sstrip"
    14             mkdir -p "${CT_BUILD_DIR}/build-strip"
    15             cd "${CT_BUILD_DIR}/build-strip"
    16             ( cd "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip"; tar cf - . ) |tar xf -
    17 
    18             CT_DoLog EXTRA "Building sstrip"
    19             CT_DoExecLog ALL make CC="${CT_HOST}-gcc" sstrip
    20             
    21             CT_DoLog EXTRA "Installing sstrip"
    22             CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
    23 
    24             CT_EndStep
    25         }
    26     ;;
    27 
    28     buildroot)
    29         do_tools_sstrip_get() {
    30             # Note: the space between sstrip and .c is on purpose.
    31             CT_GetFile sstrip .c    \
    32                        "http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/buildroot/toolchain/sstrip/"
    33         }
    34         do_tools_sstrip_extract() {
    35             # We'll let buildroot guys take care of sstrip maintenance and patching.
    36             mkdir -p "${CT_SRC_DIR}/sstrip"
    37             CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
    38         }
    39         do_tools_sstrip_build() {
    40             CT_DoStep INFO "Installing sstrip"
    41             mkdir -p "${CT_BUILD_DIR}/build-sstrip"
    42             cd "${CT_BUILD_DIR}/build-sstrip"
    43 
    44             CT_DoLog EXTRA "Building sstrip"
    45             CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
    46 
    47             CT_DoLog EXTRA "Installing sstrip"
    48             CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
    49 
    50             CT_EndStep
    51         }
    52     ;;
    53 
    54     *)  do_tools_sstrip_get() {
    55             :
    56         }
    57         do_tools_sstrip_extract() {
    58             :
    59         }
    60         do_tools_sstrip_build() {
    61             :
    62         }
    63     ;;
    64 esac