mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-30 08:03:59 +00:00
On 20090115.0012+0100, "Andy Johnson" <ajohnson@aecno.com> wrote:
... I added a step after "debug" called "finish", and moved the code in crosstool.sh after the loop that processes the steps from crosstool.sh into a do_finish function in functions. Thus, it is now possible to restart after the "debug" step to re-do the final few things (clean and compress). /trunk/scripts/crosstool-NG.sh | 38 0 38 0 -------------------------------------- /trunk/scripts/functions | 42 42 0 0 ++++++++++++++++++++++++++++++++++++++++++ /trunk/steps.mk | 3 2 1 0 ++- 3 files changed, 44 insertions(+), 39 deletions(-)
This commit is contained in:
parent
0fc2762de7
commit
1115b43f86
@ -456,44 +456,6 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then
|
|||||||
fi
|
fi
|
||||||
prev_step="${step}"
|
prev_step="${step}"
|
||||||
done
|
done
|
||||||
|
|
||||||
CT_DoLog INFO "================================================================="
|
|
||||||
|
|
||||||
CT_DoLog DEBUG "Removing access to the build system tools"
|
|
||||||
find "${CT_PREFIX_DIR}/bin" -name "${CT_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
|
|
||||||
find "${CT_PREFIX_DIR}/bin" -name "${CT_HOST}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
|
|
||||||
CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/makeinfo"
|
|
||||||
|
|
||||||
if [ "${CT_BARE_METAL}" != "y" ]; then
|
|
||||||
CT_DoLog EXTRA "Installing the populate helper"
|
|
||||||
sed -r -e 's|@@CT_TARGET@@|'"${CT_TARGET}"'|g;' \
|
|
||||||
"${CT_LIB_DIR}/scripts/populate.in" \
|
|
||||||
>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
|
|
||||||
CT_DoExecLog ALL chmod 755 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create the aliases to the target tools
|
|
||||||
CT_DoLog EXTRA "Creating toolchain aliases"
|
|
||||||
CT_Pushd "${CT_PREFIX_DIR}/bin"
|
|
||||||
for t in "${CT_TARGET}-"*; do
|
|
||||||
if [ -n "${CT_TARGET_ALIAS}" ]; then
|
|
||||||
_t=$(echo "$t" |sed -r -e 's/^'"${CT_TARGET}"'-/'"${CT_TARGET_ALIAS}"'-/;')
|
|
||||||
CT_DoExecLog ALL ln -sv "${t}" "${_t}"
|
|
||||||
fi
|
|
||||||
if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
|
|
||||||
_t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
|
|
||||||
CT_DoExecLog ALL ln -sv "${t}" "${_t}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
CT_Popd
|
|
||||||
|
|
||||||
# Remove the generated documentation files
|
|
||||||
if [ "${CT_REMOVE_DOCS}" = "y" ]; then
|
|
||||||
CT_DoLog INFO "Removing installed documentation"
|
|
||||||
CT_DoForceRmdir "${CT_PREFIX_DIR}/"{,usr/}{man,info}
|
|
||||||
CT_DoForceRmdir "${CT_SYSROOT_DIR}/"{,usr/}{man,info}
|
|
||||||
CT_DoForceRmdir "${CT_DEBUG_INSTALL_DIR}/"{,usr/}{man,info}
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CT_DoEnd INFO
|
CT_DoEnd INFO
|
||||||
|
@ -891,3 +891,45 @@ CT_DoLoadState(){
|
|||||||
rm -f "${state_dir}/tail.log"
|
rm -f "${state_dir}/tail.log"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_finish() {
|
||||||
|
CT_DoStep INFO "Cleaning-up the toolchain's directory"
|
||||||
|
|
||||||
|
CT_DoLog EXTRA "Removing access to the build system tools"
|
||||||
|
find "${CT_PREFIX_DIR}/bin" -name "${CT_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
|
||||||
|
find "${CT_PREFIX_DIR}/bin" -name "${CT_HOST}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
|
||||||
|
CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/makeinfo"
|
||||||
|
|
||||||
|
if [ "${CT_BARE_METAL}" != "y" ]; then
|
||||||
|
CT_DoLog EXTRA "Installing the populate helper"
|
||||||
|
sed -r -e 's|@@CT_TARGET@@|'"${CT_TARGET}"'|g;' \
|
||||||
|
"${CT_LIB_DIR}/scripts/populate.in" \
|
||||||
|
>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
|
||||||
|
CT_DoExecLog ALL chmod 755 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create the aliases to the target tools
|
||||||
|
CT_DoLog EXTRA "Creating toolchain aliases"
|
||||||
|
CT_Pushd "${CT_PREFIX_DIR}/bin"
|
||||||
|
for t in "${CT_TARGET}-"*; do
|
||||||
|
if [ -n "${CT_TARGET_ALIAS}" ]; then
|
||||||
|
_t=$(echo "$t" |sed -r -e 's/^'"${CT_TARGET}"'-/'"${CT_TARGET_ALIAS}"'-/;')
|
||||||
|
CT_DoExecLog ALL ln -sv "${t}" "${_t}"
|
||||||
|
fi
|
||||||
|
if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
|
||||||
|
_t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
|
||||||
|
CT_DoExecLog ALL ln -sv "${t}" "${_t}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
CT_Popd
|
||||||
|
|
||||||
|
# Remove the generated documentation files
|
||||||
|
if [ "${CT_REMOVE_DOCS}" = "y" ]; then
|
||||||
|
CT_DoLog EXTRA "Removing installed documentation"
|
||||||
|
CT_DoForceRmdir "${CT_PREFIX_DIR}/"{,usr/}{man,info}
|
||||||
|
CT_DoForceRmdir "${CT_SYSROOT_DIR}/"{,usr/}{man,info}
|
||||||
|
CT_DoForceRmdir "${CT_DEBUG_INSTALL_DIR}/"{,usr/}{man,info}
|
||||||
|
fi
|
||||||
|
|
||||||
|
CT_EndStep
|
||||||
|
}
|
||||||
|
3
steps.mk
3
steps.mk
@ -14,7 +14,7 @@ help-env::
|
|||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# The steps list
|
# The steps list
|
||||||
|
|
||||||
# Please keep the last line with a '\' and keep the folowing empy line:
|
# Please keep the last line with a '\' and keep the following empy line:
|
||||||
# it helps when diffing and merging.
|
# it helps when diffing and merging.
|
||||||
CT_STEPS := libc_check_config \
|
CT_STEPS := libc_check_config \
|
||||||
kernel_headers \
|
kernel_headers \
|
||||||
@ -33,6 +33,7 @@ CT_STEPS := libc_check_config \
|
|||||||
binutils_target \
|
binutils_target \
|
||||||
tools \
|
tools \
|
||||||
debug \
|
debug \
|
||||||
|
finish \
|
||||||
|
|
||||||
# Make the list available to sub-processes (scripts/crosstool-NG.sh needs it)
|
# Make the list available to sub-processes (scripts/crosstool-NG.sh needs it)
|
||||||
export CT_STEPS
|
export CT_STEPS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user