mirror of
https://github.com/boostorg/build.git
synced 2026-01-19 04:02:14 +00:00
Simplyfied bootstrap scripts to match each other.
The goal here is to avoid extra complexity of just building. If someone needs more control they can use the src/engine/build scripts.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@
|
||||
/src/engine/b2
|
||||
/src/engine/b2.exe
|
||||
infer-out
|
||||
build.log
|
||||
|
||||
@@ -16,7 +16,7 @@ Continuously tested on:
|
||||
|
||||
* Linux Clang 3.5, 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8
|
||||
* Linux GCC 4.7, 4.8, 4.9, 5, 6, 7, 8, 9
|
||||
* macOS Xcode 8.3.3, 9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 9.4, 9.4.1, 10.0, 10.1, 10.2, 10.2.1
|
||||
* macOS Xcode 8.3.3, 9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 9.4, 9.4.1, 10.0, 10.1, 10.2, 10.2.1, 11.0, 11.1, 11.2, 11.3, 11.3.1
|
||||
* Windows MinGW 8.1.0
|
||||
* Windows VS 2013, 2015, 2017, 2019
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
@ECHO OFF
|
||||
|
||||
REM Copyright (C) 2009 Vladimir Prus
|
||||
REM Copyright 2019 Rene Rivera
|
||||
REM Copyright 2019-2020 Rene Rivera
|
||||
REM
|
||||
REM Distributed under the Boost Software License, Version 1.0.
|
||||
REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
:b2_bootstrap
|
||||
ECHO Bootstrapping the build engine
|
||||
:b2_build
|
||||
ECHO Building the B2 engine..
|
||||
pushd src\engine
|
||||
call .\build.bat %* > ..\..\bootstrap.log
|
||||
call .\build.bat %* > ..\..\build.log
|
||||
@ECHO OFF
|
||||
popd
|
||||
if exist ".\src\engine\b2.exe" (
|
||||
@@ -21,7 +21,7 @@ goto :b2_failure
|
||||
|
||||
:b2_built
|
||||
ECHO.
|
||||
ECHO Bootstrapping is done. To build, run:
|
||||
ECHO Building is done. To install, run:
|
||||
ECHO.
|
||||
ECHO .\b2 --prefix=DIR install
|
||||
ECHO.
|
||||
@@ -30,8 +30,8 @@ goto :end
|
||||
|
||||
:b2_failure
|
||||
ECHO.
|
||||
ECHO Failed to bootstrap the build engine
|
||||
ECHO Please consult bootstrap.log for further diagnostics.
|
||||
ECHO Failed to build the B2 engine.
|
||||
ECHO Please consult build.log for further diagnostics.
|
||||
ECHO.
|
||||
goto :end
|
||||
|
||||
|
||||
107
bootstrap.sh
107
bootstrap.sh
@@ -2,110 +2,27 @@
|
||||
# Copyright (C) 2005, 2006 Douglas Gregor.
|
||||
# Copyright (C) 2006 The Trustees of Indiana University
|
||||
# Copyright (C) 2010 Bryce Lelbach
|
||||
# Copyright 2018-2019 Rene Rivera
|
||||
# Copyright 2018-2020 Rene Rivera
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# boostinspect:notab - Tabs are required for the Makefile.
|
||||
|
||||
B2=""
|
||||
TOOLSET=""
|
||||
B2_CONFIG=""
|
||||
|
||||
for option
|
||||
do
|
||||
case $option in
|
||||
|
||||
-help | --help | -h)
|
||||
want_help=yes ;;
|
||||
|
||||
-with-toolset=* | --with-toolset=* )
|
||||
TOOLSET=`expr "x$option" : "x-*with-toolset=\(.*\)"`
|
||||
;;
|
||||
|
||||
-*)
|
||||
{ echo "error: unrecognized option: $option
|
||||
Try \`$0 --help' for more information." >&2
|
||||
{ (exit 1); exit 1; }; }
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
if test "x$want_help" = xyes; then
|
||||
cat <<EOF
|
||||
\`./bootstrap.sh' creates minimal Boost.Build, which can install itself.
|
||||
|
||||
Usage: $0 [OPTION]...
|
||||
|
||||
Defaults for the options are specified in brackets.
|
||||
|
||||
Configuration:
|
||||
-h, --help display this help and exit
|
||||
--with-toolset=TOOLSET use specific Boost.Build toolset
|
||||
[automatically detected]
|
||||
EOF
|
||||
fi
|
||||
test -n "$want_help" && exit 0
|
||||
|
||||
# TBD: Determine where the script is located
|
||||
my_dir="."
|
||||
|
||||
# Determine the toolset, if not already decided
|
||||
if test "x$TOOLSET" = x; then
|
||||
guessed_toolset=`$my_dir/src/engine/build.sh --guess-toolset`
|
||||
case $guessed_toolset in
|
||||
acc | darwin | gcc | como | mipspro | pathscale | pgi | qcc | vacpp | xlcpp | clang )
|
||||
TOOLSET=$guessed_toolset
|
||||
;;
|
||||
|
||||
intel-* )
|
||||
TOOLSET=intel
|
||||
;;
|
||||
|
||||
clang* )
|
||||
TOOLSET=clang
|
||||
;;
|
||||
|
||||
sun* )
|
||||
TOOLSET=sun
|
||||
;;
|
||||
|
||||
* )
|
||||
# Not supported by Boost.Build
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case $TOOLSET in
|
||||
clang*)
|
||||
TOOLSET=clang
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
rm -f config.log
|
||||
|
||||
# Build b2
|
||||
if test "x$B2" = x; then
|
||||
echo "Bootstrapping the build engine with toolset $TOOLSET... "
|
||||
pwd=`pwd`
|
||||
(cd "$my_dir/src/engine" && ./build.sh "$TOOLSET") > bootstrap.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo
|
||||
echo "Failed to bootstrap the build engine"
|
||||
echo "Consult 'bootstrap.log' for more details"
|
||||
exit 1
|
||||
fi
|
||||
cd "$pwd"
|
||||
B2="$my_dir/src/engine/b2"
|
||||
cp "$B2" .
|
||||
echo "Building the B2 engine.."
|
||||
pwd=`pwd`
|
||||
(cd "./src/engine" && ./build.sh) > build.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo
|
||||
echo "Failed to build the B2 engine."
|
||||
echo "Please consult build.log for further diagnostics."
|
||||
exit 1
|
||||
fi
|
||||
cd "$pwd"
|
||||
cp "./src/engine/b2" .
|
||||
|
||||
cat << EOF
|
||||
|
||||
Bootstrapping is done. To build and install, run:
|
||||
Building is done. To install, run:
|
||||
|
||||
./b2 install --prefix=<DIR>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user