Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeySlice committed Sep 15, 2019
2 parents 14a7206 + 5db875d commit e823a1c
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions buildme
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,22 @@

cd "$(dirname $0)"
declare -r CLOVERROOT="$PWD"
declare -r MYTOOLCHAIN=${1:-XCODE8}
MYTOOLCHAIN=${1:-GCC53}

TOOLCHAIN_DIR=${TOOLCHAIN_DIR:-$(dirname $CLOVERROOT)/opt/local}

# Functions
checkToolchain() {
local GCC53_BIN="$TOOLCHAIN_DIR/cross/bin/x86_64-clover-linux-gnu-gcc"

# in Linux ebuild.sh force to use the CGG toolchain
if [[ "$(uname)" == Darwin ]]; then
if [[ $MYTOOLCHAIN == GCC* ]] && [[ ! -x "${GCC53_BIN}" ]]; then
MYTOOLCHAIN=XCODE8
fi
fi
}

pathmunge() {
if [[ ! $PATH =~ (^|:)$1(:|$) ]]; then
if [[ "${2:-}" = "after" ]]; then
Expand Down Expand Up @@ -64,15 +75,11 @@ export DIR_LOGS=${DIR_LOGS:-$DIR_TOOLS/logs}
}

checkTools() {
if [[ "$(uname)" == Darwin && $MYTOOLCHAIN != GCC* ]]; then
if [[ "$MYTOOLCHAIN" == XCODE* ]]; then
checkXCODE
fi

exportPaths

if [[ "$(uname)" == Darwin ]]; then
checkGETTEXT
fi
}

updateClover() {
Expand Down Expand Up @@ -149,9 +156,15 @@ echo "[BUILD CLOVER TEST]"
}

buildPkg() {
cd "${CLOVERROOT}"/CloverPackage
echo "[BUILD PKG]"
make pkg
if [[ "$(uname)" == Darwin ]]; then
cd "${CLOVERROOT}"/CloverPackage
echo "[BUILD PKG]"
checkXCODE
checkGETTEXT
make pkg
else
echo && echo "can't build pkg on a non Darwin OS!"
fi
}

buildIso() {
Expand Down Expand Up @@ -281,6 +294,7 @@ menu

# Main
set -e
checkToolchain
if [[ "$2" == travis ]]; then
buildClover
buildPkg
Expand Down

0 comments on commit e823a1c

Please sign in to comment.