1.1 --- a/scripts/crosstool-NG.sh Tue Jan 20 20:10:50 2009 +0000
1.2 +++ b/scripts/crosstool-NG.sh Tue Jan 20 20:37:43 2009 +0000
1.3 @@ -456,44 +456,6 @@
1.4 fi
1.5 prev_step="${step}"
1.6 done
1.7 -
1.8 - CT_DoLog INFO "================================================================="
1.9 -
1.10 - CT_DoLog DEBUG "Removing access to the build system tools"
1.11 - find "${CT_PREFIX_DIR}/bin" -name "${CT_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
1.12 - find "${CT_PREFIX_DIR}/bin" -name "${CT_HOST}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
1.13 - CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/makeinfo"
1.14 -
1.15 - if [ "${CT_BARE_METAL}" != "y" ]; then
1.16 - CT_DoLog EXTRA "Installing the populate helper"
1.17 - sed -r -e 's|@@CT_TARGET@@|'"${CT_TARGET}"'|g;' \
1.18 - "${CT_LIB_DIR}/scripts/populate.in" \
1.19 - >"${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
1.20 - CT_DoExecLog ALL chmod 755 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
1.21 - fi
1.22 -
1.23 - # Create the aliases to the target tools
1.24 - CT_DoLog EXTRA "Creating toolchain aliases"
1.25 - CT_Pushd "${CT_PREFIX_DIR}/bin"
1.26 - for t in "${CT_TARGET}-"*; do
1.27 - if [ -n "${CT_TARGET_ALIAS}" ]; then
1.28 - _t=$(echo "$t" |sed -r -e 's/^'"${CT_TARGET}"'-/'"${CT_TARGET_ALIAS}"'-/;')
1.29 - CT_DoExecLog ALL ln -sv "${t}" "${_t}"
1.30 - fi
1.31 - if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
1.32 - _t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
1.33 - CT_DoExecLog ALL ln -sv "${t}" "${_t}"
1.34 - fi
1.35 - done
1.36 - CT_Popd
1.37 -
1.38 - # Remove the generated documentation files
1.39 - if [ "${CT_REMOVE_DOCS}" = "y" ]; then
1.40 - CT_DoLog INFO "Removing installed documentation"
1.41 - CT_DoForceRmdir "${CT_PREFIX_DIR}/"{,usr/}{man,info}
1.42 - CT_DoForceRmdir "${CT_SYSROOT_DIR}/"{,usr/}{man,info}
1.43 - CT_DoForceRmdir "${CT_DEBUG_INSTALL_DIR}/"{,usr/}{man,info}
1.44 - fi
1.45 fi
1.46
1.47 CT_DoEnd INFO
2.1 --- a/scripts/functions Tue Jan 20 20:10:50 2009 +0000
2.2 +++ b/scripts/functions Tue Jan 20 20:37:43 2009 +0000
2.3 @@ -891,3 +891,45 @@
2.4 rm -f "${state_dir}/tail.log"
2.5 fi
2.6 }
2.7 +
2.8 +do_finish() {
2.9 + CT_DoStep INFO "Cleaning-up the toolchain's directory"
2.10 +
2.11 + CT_DoLog EXTRA "Removing access to the build system tools"
2.12 + find "${CT_PREFIX_DIR}/bin" -name "${CT_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
2.13 + find "${CT_PREFIX_DIR}/bin" -name "${CT_HOST}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
2.14 + CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/makeinfo"
2.15 +
2.16 + if [ "${CT_BARE_METAL}" != "y" ]; then
2.17 + CT_DoLog EXTRA "Installing the populate helper"
2.18 + sed -r -e 's|@@CT_TARGET@@|'"${CT_TARGET}"'|g;' \
2.19 + "${CT_LIB_DIR}/scripts/populate.in" \
2.20 + >"${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
2.21 + CT_DoExecLog ALL chmod 755 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
2.22 + fi
2.23 +
2.24 + # Create the aliases to the target tools
2.25 + CT_DoLog EXTRA "Creating toolchain aliases"
2.26 + CT_Pushd "${CT_PREFIX_DIR}/bin"
2.27 + for t in "${CT_TARGET}-"*; do
2.28 + if [ -n "${CT_TARGET_ALIAS}" ]; then
2.29 + _t=$(echo "$t" |sed -r -e 's/^'"${CT_TARGET}"'-/'"${CT_TARGET_ALIAS}"'-/;')
2.30 + CT_DoExecLog ALL ln -sv "${t}" "${_t}"
2.31 + fi
2.32 + if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
2.33 + _t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
2.34 + CT_DoExecLog ALL ln -sv "${t}" "${_t}"
2.35 + fi
2.36 + done
2.37 + CT_Popd
2.38 +
2.39 + # Remove the generated documentation files
2.40 + if [ "${CT_REMOVE_DOCS}" = "y" ]; then
2.41 + CT_DoLog EXTRA "Removing installed documentation"
2.42 + CT_DoForceRmdir "${CT_PREFIX_DIR}/"{,usr/}{man,info}
2.43 + CT_DoForceRmdir "${CT_SYSROOT_DIR}/"{,usr/}{man,info}
2.44 + CT_DoForceRmdir "${CT_DEBUG_INSTALL_DIR}/"{,usr/}{man,info}
2.45 + fi
2.46 +
2.47 + CT_EndStep
2.48 +}
3.1 --- a/steps.mk Tue Jan 20 20:10:50 2009 +0000
3.2 +++ b/steps.mk Tue Jan 20 20:37:43 2009 +0000
3.3 @@ -14,7 +14,7 @@
3.4 # ----------------------------------------------------------
3.5 # The steps list
3.6
3.7 -# Please keep the last line with a '\' and keep the folowing empy line:
3.8 +# Please keep the last line with a '\' and keep the following empy line:
3.9 # it helps when diffing and merging.
3.10 CT_STEPS := libc_check_config \
3.11 kernel_headers \
3.12 @@ -33,6 +33,7 @@
3.13 binutils_target \
3.14 tools \
3.15 debug \
3.16 + finish \
3.17
3.18 # Make the list available to sub-processes (scripts/crosstool-NG.sh needs it)
3.19 export CT_STEPS