# HG changeset patch # User Johannes Stezenbach # Date 1350258375 0 # Node ID 39ec9e913d7906f7d5e0e71604e8378033016179 # Parent 697532ca24ee4f0e8b68cd3c479244d9cac98167 scripts: move backtrace marker to CT_WORK_DIR Avoid error when commands in scripts/crosstool-NG.sh fail before CT_BUILD_DIR is set. So we need to remove the backtrace marker of a potential previous build. Previously, it was implicitly removed because we did remove the directory it was in, which is no longer the case. Signed-off-by: Johannes Stezenbach [yann.morin.1998@free.fr: remove backtrace marker on start of build] Signed-off-by: "Yann E. MORIN" Message-Id: <20121015094615.GA18673@sig21.net> Patchwork-Id: 191498 diff -r 697532ca24ee -r 39ec9e913d79 scripts/crosstool-NG.sh.in --- a/scripts/crosstool-NG.sh.in Wed Oct 17 21:52:59 2012 +0200 +++ b/scripts/crosstool-NG.sh.in Sun Oct 14 23:46:15 2012 +0000 @@ -64,6 +64,7 @@ # Where will we work? CT_WORK_DIR="${CT_WORK_DIR:-${CT_TOP_DIR}/.build}" CT_DoExecLog ALL mkdir -p "${CT_WORK_DIR}" +CT_DoExecLog DEBUG rm -f "${CT_WORK_DIR}/backtrace" # Check build file system case-sensitiveness CT_DoExecLog DEBUG touch "${CT_WORK_DIR}/foo" diff -r 697532ca24ee -r 39ec9e913d79 scripts/functions --- a/scripts/functions Wed Oct 17 21:52:59 2012 +0200 +++ b/scripts/functions Sun Oct 14 23:46:15 2012 +0000 @@ -11,8 +11,8 @@ # To avoid printing the backtace for each sub-shell # up to the top-level, just remember we've dumped it - if [ ! -f "${CT_BUILD_DIR}/backtrace" ]; then - touch "${CT_BUILD_DIR}/backtrace" + if [ ! -f "${CT_WORK_DIR}/backtrace" ]; then + touch "${CT_WORK_DIR}/backtrace" # Print steps backtrace step_depth=${CT_STEP_COUNT} @@ -50,7 +50,7 @@ CT_DoLog ERROR "" CT_DoEnd ERROR - rm -f "${CT_BUILD_DIR}/backtrace" + rm -f "${CT_WORK_DIR}/backtrace" fi exit $ret }