ctr_Repair/trunk/ConsoleDataMigration/sources/build.sh
N2614 e50f822f0c 並列数の指定
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@638 385bec56-5757-e545-9c3a-d8741f4650f1
2012-02-16 01:53:49 +00:00

60 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
# フラグ判定
for arg in $@
do
if [ "$arg" = 'RELEASE' ]; then
releaseBuild=true
fi
done
if [ $releaseBuild ] ; then
BUILD_TYPE=release,development
OPTION="PROD_BUILD=true"
else
BUILD_TYPE=development
fi
# IncrediBuildが使えるか
which xgConsole > /dev/null 2>&1
if [ "$?" -eq 0 ]; then
echo "Use IncrediBuild"
useIncrediBuild=true
PARALLEL=-j16
else
PARALLEL=-j8
fi
#################### 通常ビルド ####################
# ツールのビルド
toolBuildExec="omake BUILD=$BUILD_TYPE FILTER=CTR-TS.*fast $OPTION"
if [ $useIncrediBuild ] ; then
xgConsole /command="$toolBuildExec $PARALLEL" /profile="profile.xml"
else
$toolBuildExec $PARALLEL
fi
#Releaseはツールのみ
if [ $releaseBuild ] ; then
exit
fi
# CTR自動テストのビルド
testBuildExec="omake dotests-emumem BUILD=development FILTER=CTR-TS*.fast SKIP_RUN=true"
cd tests
if [ $useIncrediBuild ] ; then
xgConsole /command="$testBuildExec $PARALLEL" /profile="../profile.xml"
else
$testBuildExec $PARALLEL
fi
cd ../
# PC上のテストのビルド
cd tests/googletest/
if [ $useIncrediBuild ] ; then
xgConsole /command="omake $PARALLEL" /profile="../../profile.xml"
else
omake $PARALLEL
fi
cd ../../