# HG changeset patch # User "Yann E. MORIN" # Date 1214324385 0 # Node ID 254083a796a836d2c94ee91c9de24e6ef1759c3c # Parent dc9314e3d72d81769073d294576bdc23735b6b24 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 -r dc9314e3d72d -r 254083a796a8 config/global/paths.in --- a/config/global/paths.in Tue Jun 24 15:44:55 2008 +0000 +++ b/config/global/paths.in Tue Jun 24 16:19:45 2008 +0000 @@ -19,6 +19,27 @@ 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 @@ # 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 -r dc9314e3d72d -r 254083a796a8 scripts/crosstool.sh --- a/scripts/crosstool.sh Tue Jun 24 15:44:55 2008 +0000 +++ b/scripts/crosstool.sh Tue Jun 24 16:19:45 2008 +0000 @@ -86,15 +86,16 @@ 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