-
Notifications
You must be signed in to change notification settings - Fork 47
/
build.sh
executable file
·62 lines (44 loc) · 1.36 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
# Run a command, and echo before doing so. Also checks the exit
# status and quits if there was an error.
echo_run ()
{
echo "EXEC : $@"
"$@"
r=$?
if test $r -ne 0 ; then
exit $r
fi
}
echo "INFO : Make sure you run the configure script before this one to ensure dependencies are in place."
if [ "$BUILDTOOL" == "xcode" ] ; then
exit 1;
if [ "$BUILDMODE" == "debug" ] ; then
CURMODE="Debug"
elif [ "$BUILDMODE" == "release" ] ; then
CURMODE="Release"
else
echo "INFO : xcode mode unknown. Defaulting to debug."
CURMODE="Debug"
fi
cd adobe_platform_libraries/xcode_ide
echo_run xcodebuild -project begin.xcodeproj -configuration $CURMODE
elif [ "$BUILDTOOL" == "bjam" ] ; then
if [ "$BUILDMODE" == "debug" ] ; then
CURMODE="debug"
elif [ "$BUILDMODE" == "release" ] ; then
CURMODE="release"
else
echo "INFO : bjam mode unknown. Defaulting to debug."
CURMODE="debug"
fi
PROCESSOR_COUNT=`sysctl -n hw.ncpu`
if [ "$PROCESSOR_COUNT" == "" ] ; then
PROCESSOR_COUNT=`nproc`
fi
echo "INFO : Found $PROCESSOR_COUNT processors."
echo_run ../boost_libraries/b2 --toolset=${TOOLSET:-clang} --without-python --hash -j$PROCESSOR_COUNT $CURMODE
else
echo "ERRR : BUILDTOOL unknown. Goodbye."
exit 1;
fi