]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | @ECHO OFF |
2 | ||
11fdf7f2 TL |
3 | SETLOCAL |
4 | ||
20effc67 | 5 | REM Copyright 2019-2020 Rene Rivera |
7c673cae FG |
6 | REM Copyright (C) 2009 Vladimir Prus |
7 | REM | |
8 | REM Distributed under the Boost Software License, Version 1.0. | |
9 | REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) | |
10 | ||
11 | ECHO Building Boost.Build engine | |
92f5a8d4 | 12 | if exist ".\tools\build\src\engine\b2.exe" del tools\build\src\engine\b2.exe |
7c673cae FG |
13 | pushd tools\build\src\engine |
14 | ||
20effc67 | 15 | call .\build.bat |
7c673cae FG |
16 | @ECHO OFF |
17 | ||
18 | popd | |
19 | ||
92f5a8d4 TL |
20 | if exist ".\tools\build\src\engine\b2.exe" ( |
21 | copy .\tools\build\src\engine\b2.exe . > nul | |
7c673cae FG |
22 | goto :bjam_built) |
23 | ||
24 | goto :bjam_failure | |
25 | ||
26 | :bjam_built | |
27 | ||
28 | REM Ideally, we should obtain the toolset that build.bat has | |
29 | REM guessed. However, it uses setlocal at the start and does not | |
30 | REM export BOOST_JAM_TOOLSET, and I don't know how to do that | |
11fdf7f2 TL |
31 | REM properly. Default to msvc if not specified. |
32 | ||
33 | SET TOOLSET=msvc | |
34 | ||
35 | IF "%1"=="gcc" SET TOOLSET=gcc | |
20effc67 | 36 | IF "%1"=="clang" SET TOOLSET=clang |
11fdf7f2 TL |
37 | |
38 | IF "%1"=="vc71" SET TOOLSET=msvc : 7.1 | |
39 | IF "%1"=="vc8" SET TOOLSET=msvc : 8.0 | |
40 | IF "%1"=="vc9" SET TOOLSET=msvc : 9.0 | |
41 | IF "%1"=="vc10" SET TOOLSET=msvc : 10.0 | |
42 | IF "%1"=="vc11" SET TOOLSET=msvc : 11.0 | |
43 | IF "%1"=="vc12" SET TOOLSET=msvc : 12.0 | |
44 | IF "%1"=="vc14" SET TOOLSET=msvc : 14.0 | |
45 | IF "%1"=="vc141" SET TOOLSET=msvc : 14.1 | |
92f5a8d4 | 46 | IF "%1"=="vc142" SET TOOLSET=msvc : 14.2 |
1e59de90 | 47 | IF "%1"=="vc143" SET TOOLSET=msvc : 14.3 |
7c673cae | 48 | |
92f5a8d4 TL |
49 | ECHO. |
50 | ECHO Generating Boost.Build configuration in project-config.jam for %TOOLSET%... | |
51 | ECHO # Boost.Build Configuration > project-config.jam | |
52 | ECHO # Automatically generated by bootstrap.bat >> project-config.jam | |
53 | ECHO. >> project-config.jam | |
54 | ECHO import option ; >> project-config.jam | |
7c673cae | 55 | ECHO. >> project-config.jam |
11fdf7f2 | 56 | ECHO using %TOOLSET% ; >> project-config.jam |
7c673cae FG |
57 | ECHO. >> project-config.jam |
58 | ECHO option.set keep-going : false ; >> project-config.jam | |
59 | ECHO. >> project-config.jam | |
60 | ||
61 | ECHO. | |
62 | ECHO Bootstrapping is done. To build, run: | |
63 | ECHO. | |
64 | ECHO .\b2 | |
92f5a8d4 TL |
65 | ECHO. |
66 | ||
67 | IF EXIST libs\config\include ( | |
68 | ECHO. To generate header files, run: | |
69 | ECHO. | |
70 | ECHO. .\b2 headers | |
71 | ECHO. | |
72 | ) | |
73 | ||
7c673cae FG |
74 | ECHO To adjust configuration, edit 'project-config.jam'. |
75 | ECHO Further information: | |
76 | ECHO. | |
77 | ECHO - Command line help: | |
78 | ECHO .\b2 --help | |
79 | ECHO. | |
80 | ECHO - Getting started guide: | |
81 | ECHO http://boost.org/more/getting_started/windows.html | |
82 | ECHO. | |
83 | ECHO - Boost.Build documentation: | |
92f5a8d4 | 84 | ECHO http://www.boost.org/build/ |
11fdf7f2 | 85 | ECHO. |
7c673cae FG |
86 | |
87 | goto :end | |
88 | ||
89 | :bjam_failure | |
90 | ||
91 | ECHO. | |
92 | ECHO Failed to build Boost.Build engine. | |
7c673cae | 93 | ECHO. |
7c673cae | 94 | |
11fdf7f2 TL |
95 | REM Set an error code to allow `bootstrap && b2` |
96 | cmd /c exit /b 1 > nul | |
7c673cae FG |
97 | |
98 | :end |