scripts/build/internals.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Apr 20 21:10:03 2009 +0000 (2009-04-20)
changeset 1299 3448ac3f1a5d
parent 1281 12a2991fcffb
child 1401 604c5c80e24a
permissions -rw-r--r--
There's no longer any reason to require GNU awk:
- the only part that required it (socks proxy settings) is gone,
- all remaining awk scripts are POSIXly correct (or should be).

-------- diffstat follows --------
/trunk/configure | 5 2 3 0 ++---
/trunk/Makefile.in | 2 0 2 0 --
/trunk/scripts/build/kernel/linux.sh | 2 1 1 0 +-
/trunk/scripts/build/internals.sh | 1 0 1 0 -
/trunk/scripts/build/mpfr.sh | 2 1 1 0 +-
/trunk/scripts/functions | 4 2 2 0 ++--
/trunk/scripts/saveSample.sh.in | 4 2 2 0 ++--
7 files changed, 8 insertions(+), 12 deletions(-)
     1 # This file contains crosstool-NG internal steps
     2 
     3 # This step is called once all components were built, to remove
     4 # un-wanted files, to add tuple aliases, and to add the final
     5 # crosstool-NG-provided files.
     6 do_finish() {
     7     CT_DoStep INFO "Cleaning-up the toolchain's directory"
     8 
     9     CT_DoLog EXTRA "Removing access to the build system tools"
    10     find "${CT_PREFIX_DIR}/bin" -name "${CT_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
    11     find "${CT_PREFIX_DIR}/bin" -name "${CT_HOST}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
    12     CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/makeinfo"
    13 
    14     if [ "${CT_BARE_METAL}" != "y" ]; then
    15         CT_DoLog EXTRA "Installing the populate helper"
    16         sed -r -e 's|@@CT_TARGET@@|'"${CT_TARGET}"'|g;' \
    17                -e 's|@@CT_install@@|'"${install}"'|g;'  \
    18                -e 's|@@CT_bash@@|'"${bash}"'|g;'        \
    19                -e 's|@@CT_grep@@|'"${grep}"'|g;'        \
    20                -e 's|@@CT_make@@|'"${make}"'|g;'        \
    21                -e 's|@@CT_sed@@|'"${sed}"'|g;'          \
    22                "${CT_LIB_DIR}/scripts/populate.in"      \
    23                >"${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
    24         CT_DoExecLog ALL chmod 755 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
    25     fi
    26 
    27     # Create the aliases to the target tools
    28     CT_DoLog EXTRA "Creating toolchain aliases"
    29     CT_Pushd "${CT_PREFIX_DIR}/bin"
    30     for t in "${CT_TARGET}-"*; do
    31         if [ -n "${CT_TARGET_ALIAS}" ]; then
    32             _t=$(echo "$t" |sed -r -e 's/^'"${CT_TARGET}"'-/'"${CT_TARGET_ALIAS}"'-/;')
    33             CT_DoExecLog ALL ln -sv "${t}" "${_t}"
    34         fi
    35         if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
    36             _t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
    37             CT_DoExecLog ALL ln -sv "${t}" "${_t}"
    38         fi
    39     done
    40     CT_Popd
    41 
    42     # Remove the generated documentation files
    43     if [ "${CT_REMOVE_DOCS}" = "y" ]; then
    44         CT_DoLog EXTRA "Removing installed documentation"
    45         CT_DoForceRmdir "${CT_PREFIX_DIR}/"{,usr/}{man,info}
    46         CT_DoForceRmdir "${CT_SYSROOT_DIR}/"{,usr/}{man,info}
    47         CT_DoForceRmdir "${CT_DEBUGROOT_DIR}/"{,usr/}{man,info}
    48     fi
    49 
    50     CT_EndStep
    51 }