]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
make.sh: Build in a separate directory for each architecture
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 Jul 2024 08:58:09 +0000 (08:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 22 Jul 2024 15:21:18 +0000 (15:21 +0000)
This allows running multiple builds in the same working directory.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index 400473f300756afbdaa3f46459ec4c528e7a46c2..39e1b7c5710cb09c6961b54a88c51131d2fa45dc 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -180,7 +180,6 @@ configure_build() {
        fi
 
        BUILD_ARCH="${build_arch}"
-       TOOLS_DIR="/tools_${BUILD_ARCH}"
 
        # Enables hardening
        HARDENING_CFLAGS="-Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection"
@@ -1869,9 +1868,11 @@ done
 configure_build "${BUILD_ARCH}"
 
 # Set directories
+readonly CACHE_DIR="${BASEDIR}/cache"
 readonly CCACHE_DIR="${BASEDIR}/ccache/${BUILD_ARCH}/${TOOLCHAINVER}"
-readonly BUILD_DIR="${BASEDIR}/build"
-readonly LOG_DIR="${BASEDIR}/log"
+readonly BUILD_DIR="${BASEDIR}/build_${BUILD_ARCH}"
+readonly LOG_DIR="${BASEDIR}/log_${BUILD_ARCH}"
+readonly TOOLS_DIR="/tools_${BUILD_ARCH}"
 
 # Set the LOGFILE
 LOGFILE="${LOG_DIR}/_build.preparation.log"