aboutsummaryrefslogtreecommitdiff
path: root/etc/bootstrap/bbot-bootstrap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'etc/bootstrap/bbot-bootstrap.sh')
-rwxr-xr-xetc/bootstrap/bbot-bootstrap.sh39
1 files changed, 29 insertions, 10 deletions
diff --git a/etc/bootstrap/bbot-bootstrap.sh b/etc/bootstrap/bbot-bootstrap.sh
index d2153e8..4914ae4 100755
--- a/etc/bootstrap/bbot-bootstrap.sh
+++ b/etc/bootstrap/bbot-bootstrap.sh
@@ -33,22 +33,15 @@ run ()
# Defaults that can be changed via command line.
#
-cxx=g++
build=/tmp
environments="$HOME/environments"
+make=
+jobs=
# Parse options.
#
while test $# -ne 0; do
case $1 in
- --cxx)
- shift
- if test $# -eq 0; then
- error "missing C++ compiler after --cxx"
- fi
- cxx="$1"
- shift
- ;;
--build)
shift
if test $# -eq 0; then
@@ -65,6 +58,22 @@ while test $# -ne 0; do
environments="$1"
shift
;;
+ --make)
+ shift
+ if test $# -eq 0; then
+ error "missing make program after --make"
+ fi
+ make="$1"
+ shift
+ ;;
+ --jobs)
+ shift
+ if test $# -eq 0; then
+ error "missing jobs number after --jobs"
+ fi
+ jobs="$1"
+ shift
+ ;;
*)
break
;;
@@ -85,6 +94,16 @@ timeout=600
#tftp="127.0.0.1:55123"
#build_options="--install-dir $install"
+# If make was specified, add it to build_options.
+#
+if test -n "$make"; then
+ build_options="$build_options --make $make"
+
+ if test -n "$jobs"; then
+ build_options="$build_options --make -j$jobs"
+ fi
+fi
+
PATH="$install/bin:$PATH"
export PATH
@@ -121,7 +140,7 @@ run rm trust
#
bstrap="$(echo build2-toolchain-*)"
run cd "$bstrap"
-run ./build.sh --timeout "$timeout" --trust "$trust" $build_options "$@" "$cxx"
+run ./build.sh --timeout "$timeout" --trust "$trust" $build_options "$@"
run cd ..
run rm -r "$bstrap"