]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
make.sh: Create /tools_${arch} link only when building a toolchain
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Nov 2017 11:54:37 +0000 (11:54 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Nov 2017 11:54:37 +0000 (11:54 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index 5f619d30b392b383eef0f545638de632390f8d14..87125c0ded8c3c26afd1e9b42aa95e4a9f9f4da5 100755 (executable)
--- 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