From: Michael Tremer Date: Wed, 29 Nov 2017 11:54:37 +0000 (+0000) Subject: make.sh: Create /tools_${arch} link only when building a toolchain X-Git-Tag: v2.19-core117~1^2~41 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=6bd3a13121c8087bc2062ab9999c3c6fc5f12727 make.sh: Create /tools_${arch} link only when building a toolchain Signed-off-by: Michael Tremer --- diff --git a/make.sh b/make.sh index 5f619d30b3..87125c0ded 100755 --- a/make.sh +++ b/make.sh @@ -433,19 +433,6 @@ prepareenv() { # Set LFS Directory LFS=$BASEDIR/build - # Check ${TOOLS_DIR} symlink - if [ -h "${TOOLS_DIR}" ]; then - rm -f "${TOOLS_DIR}" - fi - - if [ ! -e "${TOOLS_DIR}" ]; then - ln -s "${BASEDIR}/build${TOOLS_DIR}" "${TOOLS_DIR}" - fi - - if [ ! -h "${TOOLS_DIR}" ]; then - exiterror "Could not create ${TOOLS_DIR} symbolic link" - fi - # Setup environment set +h LC_ALL=POSIX @@ -910,6 +897,19 @@ buildtoolchain() { exiterror "Could not find GCC. You will need a working build enviroment in order to build the toolchain." fi + # Check ${TOOLS_DIR} symlink + if [ -h "${TOOLS_DIR}" ]; then + rm -f "${TOOLS_DIR}" + fi + + if [ ! -e "${TOOLS_DIR}" ]; then + ln -s "${BASEDIR}/build${TOOLS_DIR}" "${TOOLS_DIR}" + fi + + if [ ! -h "${TOOLS_DIR}" ]; then + exiterror "Could not create ${TOOLS_DIR} symbolic link" + fi + LOGFILE="$BASEDIR/log/_build.toolchain.log" export LOGFILE