mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Don't use Ninja if the build files weren't generated by Ninja
This commit is contained in:
parent
2bedd687db
commit
986b326c25
1 changed files with 19 additions and 3 deletions
20
bin/build.sh
20
bin/build.sh
|
@ -4,12 +4,28 @@ echo Starting build.sh
|
|||
PATH=/usr/local/bin:$PATH:$HOME/bin
|
||||
SCRIPTPATH=$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
|
||||
ROOTPATH="$(dirname "$SCRIPTPATH")"
|
||||
echo Building from from $SCRIPTPATH
|
||||
echo Building from $SCRIPTPATH
|
||||
cd $SCRIPTPATH
|
||||
|
||||
USE_NINJA=""
|
||||
if [[ $1 == "clean" ]]; then
|
||||
rm -rf ../jbuild
|
||||
rm -rf ../jbuild_d
|
||||
fi
|
||||
|
||||
if command -v ninja >/dev/null 2>&1 ; then
|
||||
CAN_USE_NINJA=1
|
||||
if [ -d ../jbuild_d ] && [ ! -f ../jbuild_d/build.ninja ]; then
|
||||
CAN_USE_NINJA=0
|
||||
fi
|
||||
|
||||
if [ $CAN_USE_NINJA == 1 ]; then
|
||||
echo "Ninja is enabled for this build."
|
||||
USE_NINJA="-GNinja"
|
||||
else
|
||||
echo "Ninja couldn't be enabled for this build, consider doing a clean build to start using Ninja for faster build speeds."
|
||||
fi
|
||||
else
|
||||
echo "Ninja isn't installed, consider installing it for faster build speeds."
|
||||
fi
|
||||
|
||||
# exit when any command fails
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue