From f548da18c34bd54a88c6eb30e5bf125110a00e88 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 18 Oct 2017 14:31:25 +0200 Subject: Add support for GNU make-based bootstrap in build.sh --- build.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'build.sh') 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 Optional sudo program to use." diag " --repo Alternative package repository location." diag " --trust Certificate fingerprint to trust." + diag " --make 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. -- cgit v1.1