-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·26 lines (24 loc) · 823 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·26 lines (24 loc) · 823 Bytes
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
#!/bin/bash
# Builds the default library for every memory model, since a program links the build that
# matches its own -mm= and there is deliberately no fallback to another model's copy.
#
# ./build.sh -> release and debug, all three models
# ./build.sh release -> release only, all three models
# ./build.sh release rc -> just that one
#
# See tslang/include/TypeScript/Defines.h for the resulting layout.
build_all_models() {
for mm in gc rc none ; do
./scripts/build.sh "$1" gcc pic "$mm" || return $?
done
}
if [ -n "$2" ] ; then
./scripts/build.sh "$1" gcc pic "$2"
elif [ "$1" == "debug" ] ; then
build_all_models debug
elif [ "$1" == "release" ] ; then
build_all_models release
else
build_all_models release || exit $?
build_all_models debug
fi