From 6180cc0ea5a9041868fd02600f678ecbc60c6c93 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 24 Jun 2008 16:19:45 +0000 Subject: Allow to store working files outside the build tree (eg. incase the working tree is on the network). /trunk/scripts/crosstool.sh | 9 5 4 0 +++++---- /trunk/config/global/paths.in | 23 22 1 0 ++++++++++++++++++++++- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/config/global/paths.in b/config/global/paths.in index 3736d66..0f04f14 100644 --- a/config/global/paths.in +++ b/config/global/paths.in @@ -19,6 +19,27 @@ config SAVE_TARBALLS If you say 'y' here, new downloaded tarballs will be saved in the directory you entered above. +config WORK_DIR + string + prompt "Working directory" + default "${CT_TOP_DIR}/targets" + help + Set this to the directory where all build actions will be done. + + The default is "${CT_TOP_DIR}/targets", and leaving this option + empty will also use the default. + + You should not need to change that, except in one very peculiar + setup: + - your crosstool-NG source directory is on the network + - you configured crosstool-NG with --local + This kind of setup is a pain, as any action involving source file + access would have to go through the wire. In this case, you should + set CT_WORK_DIR to point to a path local to your machine, to avoid + any network overhead. + + Do *NOT* change it if you don't know better. + config PREFIX_DIR string prompt "Prefix directory" @@ -31,7 +52,7 @@ config INSTALL_DIR # prompt "Install directory" default "${CT_PREFIX_DIR}" # help -# This is the path the target will be installed into. +# This is the path the toolchain will be installed into. # # Normally, you would set this to ${CT_PREFIX_DIR}, but if for some reasons # you can't write there, you can install somewhere else and have a third diff --git a/scripts/crosstool.sh b/scripts/crosstool.sh index 62383fd..6002e44 100755 --- a/scripts/crosstool.sh +++ b/scripts/crosstool.sh @@ -86,15 +86,16 @@ CT_CC_FILE="${CT_CC}-${CT_CC_VERSION}" CT_LIBC_FILE="${CT_LIBC}-${CT_LIBC_VERSION}" # Where will we work? -CT_TARBALLS_DIR="${CT_TOP_DIR}/targets/tarballs" -CT_SRC_DIR="${CT_TOP_DIR}/targets/src" -CT_BUILD_DIR="${CT_TOP_DIR}/targets/${CT_TARGET}/build" +: "${CT_WORK_DIR:=${CT_TOP_DIR}/targets}" +CT_TARBALLS_DIR="${CT_WORK_DIR}/tarballs" +CT_SRC_DIR="${CT_WORK_DIR}/src" +CT_BUILD_DIR="${CT_WORK_DIR}/${CT_TARGET}/build" CT_DEBUG_INSTALL_DIR="${CT_INSTALL_DIR}/${CT_TARGET}/debug-root" # Note: we'll always install the core compiler in its own directory, so as to # not mix the two builds: core and final. CT_CC_CORE_STATIC_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-static" CT_CC_CORE_SHARED_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-shared" -CT_STATE_DIR="${CT_TOP_DIR}/targets/${CT_TARGET}/state" +CT_STATE_DIR="${CT_WORK_DIR}/${CT_TARGET}/state" # We must ensure that we can restart if asked for! if [ -n "${CT_RESTART}" -a ! -d "${CT_STATE_DIR}" ]; then -- cgit v0.10.2-6-g49f6