scripts/crosstool-NG.sh.in
branchnewlib
changeset 1365 c4d124ed9f8e
parent 1247 9759fe659b4f
     1.1 --- a/scripts/crosstool-NG.sh.in	Sun Mar 08 17:09:39 2009 +0000
     1.2 +++ b/scripts/crosstool-NG.sh.in	Sun Apr 19 16:17:11 2009 +0000
     1.3 @@ -30,6 +30,12 @@
     1.4  
     1.5  # Where will we work?
     1.6  CT_WORK_DIR="${CT_WORK_DIR:-${CT_TOP_DIR}/targets}"
     1.7 +CT_DoExecLog ALL mkdir -p "${CT_WORK_DIR}"
     1.8 +
     1.9 +# Check build file system case-sensitiveness
    1.10 +CT_DoExecLog DEBUG touch "${CT_WORK_DIR}/foo"
    1.11 +CT_TestAndAbort "Your file system in '${CT_WORK_DIR}' is *not* case-sensitive!" -f "${CT_WORK_DIR}/FOO"
    1.12 +CT_DoExecLog DEBUG rm -f "${CT_WORK_DIR}/foo"
    1.13  
    1.14  # Create the bin-overide early
    1.15  # Contains symlinks to the tools found by ./configure
    1.16 @@ -109,11 +115,13 @@
    1.17  CT_TARBALLS_DIR="${CT_WORK_DIR}/tarballs"
    1.18  CT_SRC_DIR="${CT_WORK_DIR}/src"
    1.19  CT_BUILD_DIR="${CT_WORK_DIR}/${CT_TARGET}/build"
    1.20 +CT_STATE_DIR="${CT_WORK_DIR}/${CT_TARGET}/state"
    1.21 +CT_CONFIG_DIR="${CT_BUILD_DIR}/configs"
    1.22 +
    1.23  # Note: we'll always install the core compiler in its own directory, so as to
    1.24  # not mix the two builds: core and final.
    1.25  CT_CC_CORE_STATIC_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-static"
    1.26  CT_CC_CORE_SHARED_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-shared"
    1.27 -CT_STATE_DIR="${CT_WORK_DIR}/${CT_TARGET}/state"
    1.28  
    1.29  # We must ensure that we can restart if asked for!
    1.30  if [ -n "${CT_RESTART}" -a ! -d "${CT_STATE_DIR}"  ]; then
    1.31 @@ -189,11 +197,19 @@
    1.32  CT_DoExecLog ALL mkdir -p "${CT_TARBALLS_DIR}"
    1.33  CT_DoExecLog ALL mkdir -p "${CT_SRC_DIR}"
    1.34  CT_DoExecLog ALL mkdir -p "${CT_BUILD_DIR}"
    1.35 +CT_DoExecLog ALL mkdir -p "${CT_CONFIG_DIR}"
    1.36  CT_DoExecLog ALL mkdir -p "${CT_INSTALL_DIR}"
    1.37  CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}"
    1.38  CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}"
    1.39  CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}"
    1.40 -CT_DoExecLog ALL mkdir -p "${CT_STATE_DIR}"
    1.41 +
    1.42 +# Only create the state dir if asked for a restartable build
    1.43 +[ -n "${CT_DEBUG_CT_SAVE_STEPS}" ] && CT_DoExecLog ALL mkdir -p "${CT_STATE_DIR}"
    1.44 +
    1.45 +# Check install file system case-sensitiveness
    1.46 +CT_DoExecLog DEBUG touch "${CT_PREFIX_DIR}/foo"
    1.47 +CT_TestAndAbort "Your file system in '${CT_PREFIX_DIR}' is *not* case-sensitive!" -f "${CT_PREFIX_DIR}/FOO"
    1.48 +CT_DoExecLog DEBUG rm -f "${CT_PREFIX_DIR}/foo"
    1.49  
    1.50  # Kludge: CT_INSTALL_DIR and CT_PREFIX_DIR might have grown read-only if
    1.51  # the previous build was successful. To be able to move the logfile there,