Ports: Use SERENITY_ARCH in .port_include.sh if already defined

Instead of always hardcoding i686, only use it as fallback value as we
already do in other scripts.
This commit is contained in:
Linus Groh 2021-03-11 22:00:38 +01:00 committed by Andreas Kling
parent 4c497228a9
commit 15a820e9ad

View file

@ -1,15 +1,15 @@
#!/usr/bin/env bash
set -eu
SCRIPT=`dirname $0`
export SERENITY_ROOT=`realpath $SCRIPT/../`
export SERENITY_ARCH=i686
SCRIPT="$(dirname "${0}")"
export SERENITY_ROOT="$(realpath "${SCRIPT}/../")"
export SERENITY_ARCH="${SERENITY_ARCH:-i686}"
export SERENITY_BUILD_DIR="${SERENITY_ROOT}/Build/${SERENITY_ARCH}"
export CC=i686-pc-serenity-gcc
export CXX=i686-pc-serenity-g++
export AR=i686-pc-serenity-ar
export RANLIB=i686-pc-serenity-ranlib
export PATH=$SERENITY_ROOT/Toolchain/Local/i686/bin:$PATH
export CC="${SERENITY_ARCH}-pc-serenity-gcc"
export CXX="${SERENITY_ARCH}-pc-serenity-g++"
export AR="${SERENITY_ARCH}-pc-serenity-ar"
export RANLIB="${SERENITY_ARCH}-pc-serenity-ranlib"
export PATH="${SERENITY_ROOT}/Toolchain/Local/${SERENITY_ARCH}/bin:${PATH}"
packagesdb="${SERENITY_BUILD_DIR}/packages.db"