summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-01-28 21:06:49 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-01-28 21:06:49 (GMT)
commit7817bcebe7e1921ffd00a421208470d22ffcb1bc (patch)
treed4a36918e745e5051aff2d64e57bb5bebe2a25f0 /scripts
parent4d82364f1f616216122f1573a704e9285913e4e5 (diff)
config: add an option not to remove the destination directory
In certain circumstances, removing the destination/installation directory is a bad idea. For example, when the build environment is already taking care of sanitising the build tree, and pre-installs stuff in there, it is a very bad idea to remove the destination directory. This happens now in buildroot, as the crostool-NG backend now installs the toolchain in the common host-tools directory, and pre-install there a few host-utilities (eg. host-automake and host-gawk). Provide a config knob to turn on/off the removal of the destination directory, defaulting to 'y' (previous behavior), and forced to 'n' when used as a backend. Reported-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/crosstool-NG.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 2fa1994..fffb841 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -229,7 +229,7 @@ if [ -z "${CT_RESTART}" ]; then
if [ "${CT_FORCE_EXTRACT}" = "y" -a -d "${CT_SRC_DIR}" ]; then
CT_DoForceRmdir "${CT_SRC_DIR}"
fi
- if [ -d "${CT_INSTALL_DIR}" ]; then
+ if [ -d "${CT_INSTALL_DIR}" -a "${CT_RM_RF_PREFIX_DIR}" = "y" ]; then
CT_DoForceRmdir "${CT_INSTALL_DIR}"
fi
# In case we start anew, get rid of the previously saved state directory