aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-10-18 14:31:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-10-18 14:31:25 +0200
commitf548da18c34bd54a88c6eb30e5bf125110a00e88 (patch)
tree24290ddcdbd33569bc7d6a6303a48fbc1f53c96b /build.sh
parent35d29c97b3a1e86e5397d6164d06739c9a5a9971 (diff)
Add support for GNU make-based bootstrap in build.sh
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh22
1 files changed, 19 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index 20ac8d6..7ab3aae 100755
--- a/build.sh
+++ b/build.sh
@@ -43,6 +43,7 @@ idir=
sudo=
sudo_set=
trust=
+make=
while test $# -ne 0; do
case $1 in
@@ -54,6 +55,7 @@ while test $# -ne 0; do
diag " --sudo <prog> Optional sudo program to use."
diag " --repo <loc> Alternative package repository location."
diag " --trust <fp> Certificate fingerprint to trust."
+ diag " --make <jobs> Bootstrap using GNU make instead of script."
diag
diag "By default the script will install into /usr/local using sudo(1)."
diag "To use sudo for a custom installation directory you need to specify"
@@ -109,6 +111,16 @@ while test $# -ne 0; do
trust="$1"
shift
;;
+ --make)
+ shift
+ if test $# -eq 0; then
+ diag "error: number of jobs expected after --make"
+ diag "$usage"
+ exit 1
+ fi
+ make="$1"
+ shift
+ ;;
*)
cxx="$1"
break
@@ -134,12 +146,12 @@ if test -z "$idir"; then
fi
if test -f build/config.build; then
- diag "current directory already configured, start with clean source"
+ diag "error: current directory already configured, start with clean source"
exit 1
fi
if test -d "../$cdir"; then
- diag "../$cdir/ bpkg configuration directory already exists"
+ diag "error: ../$cdir/ bpkg configuration directory already exists"
exit 1
fi
@@ -169,7 +181,11 @@ esac
# Bootstrap, stage 1.
#
run cd build2
-run ./bootstrap.sh "$cxx"
+if test -z "$make"; then
+ run ./bootstrap.sh "$cxx"
+else
+ run make -f ./bootstrap.gmake -j "$make" "CXX=$cxx"
+fi
run build2/b-boot --version
# Bootstrap, stage 2.