diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-10-18 14:31:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-10-18 14:31:25 +0200 |
commit | f548da18c34bd54a88c6eb30e5bf125110a00e88 (patch) | |
tree | 24290ddcdbd33569bc7d6a6303a48fbc1f53c96b /build.sh | |
parent | 35d29c97b3a1e86e5397d6164d06739c9a5a9971 (diff) |
Add support for GNU make-based bootstrap in build.sh
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -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. |