]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | @ECHO OFF |
2 | ||
11fdf7f2 TL |
3 | SETLOCAL |
4 | ||
7c673cae FG |
5 | REM Copyright (C) 2009 Vladimir Prus |
6 | REM | |
7 | REM Distributed under the Boost Software License, Version 1.0. | |
8 | REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) | |
9 | ||
10 | ECHO Building Boost.Build engine | |
11 | if exist ".\tools\build\src\engine\bin.ntx86\b2.exe" del tools\build\src\engine\bin.ntx86\b2.exe | |
12 | if exist ".\tools\build\src\engine\bin.ntx86\bjam.exe" del tools\build\src\engine\bin.ntx86\bjam.exe | |
13 | if exist ".\tools\build\src\engine\bin.ntx86_64\b2.exe" del tools\build\src\engine\bin.ntx86_64\b2.exe | |
14 | if exist ".\tools\build\src\engine\bin.ntx86_64\bjam.exe" del tools\build\src\engine\bin.ntx86_64\bjam.exe | |
15 | pushd tools\build\src\engine | |
16 | ||
17 | call .\build.bat %* > ..\..\..\..\bootstrap.log | |
18 | @ECHO OFF | |
19 | ||
20 | popd | |
21 | ||
22 | if exist ".\tools\build\src\engine\bin.ntx86\bjam.exe" ( | |
23 | copy .\tools\build\src\engine\bin.ntx86\b2.exe . > nul | |
24 | copy .\tools\build\src\engine\bin.ntx86\bjam.exe . > nul | |
25 | goto :bjam_built) | |
26 | ||
27 | if exist ".\tools\build\src\engine\bin.ntx86_64\bjam.exe" ( | |
28 | copy .\tools\build\src\engine\bin.ntx86_64\b2.exe . > nul | |
29 | copy .\tools\build\src\engine\bin.ntx86_64\bjam.exe . > nul | |
30 | goto :bjam_built) | |
31 | ||
32 | goto :bjam_failure | |
33 | ||
34 | :bjam_built | |
35 | ||
36 | REM Ideally, we should obtain the toolset that build.bat has | |
37 | REM guessed. However, it uses setlocal at the start and does not | |
38 | REM export BOOST_JAM_TOOLSET, and I don't know how to do that | |
11fdf7f2 TL |
39 | REM properly. Default to msvc if not specified. |
40 | ||
41 | SET TOOLSET=msvc | |
42 | ||
43 | IF "%1"=="gcc" SET TOOLSET=gcc | |
44 | ||
45 | IF "%1"=="vc71" SET TOOLSET=msvc : 7.1 | |
46 | IF "%1"=="vc8" SET TOOLSET=msvc : 8.0 | |
47 | IF "%1"=="vc9" SET TOOLSET=msvc : 9.0 | |
48 | IF "%1"=="vc10" SET TOOLSET=msvc : 10.0 | |
49 | IF "%1"=="vc11" SET TOOLSET=msvc : 11.0 | |
50 | IF "%1"=="vc12" SET TOOLSET=msvc : 12.0 | |
51 | IF "%1"=="vc14" SET TOOLSET=msvc : 14.0 | |
52 | IF "%1"=="vc141" SET TOOLSET=msvc : 14.1 | |
7c673cae FG |
53 | |
54 | ECHO import option ; > project-config.jam | |
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 | |
65 | ECHO. | |
66 | ECHO To adjust configuration, edit 'project-config.jam'. | |
67 | ECHO Further information: | |
68 | ECHO. | |
69 | ECHO - Command line help: | |
70 | ECHO .\b2 --help | |
71 | ECHO. | |
72 | ECHO - Getting started guide: | |
73 | ECHO http://boost.org/more/getting_started/windows.html | |
74 | ECHO. | |
75 | ECHO - Boost.Build documentation: | |
76 | ECHO http://www.boost.org/build/doc/html/index.html | |
11fdf7f2 | 77 | ECHO. |
7c673cae FG |
78 | |
79 | goto :end | |
80 | ||
81 | :bjam_failure | |
82 | ||
83 | ECHO. | |
84 | ECHO Failed to build Boost.Build engine. | |
85 | ECHO Please consult bootstrap.log for further diagnostics. | |
86 | ECHO. | |
7c673cae | 87 | |
11fdf7f2 TL |
88 | REM Set an error code to allow `bootstrap && b2` |
89 | cmd /c exit /b 1 > nul | |
7c673cae FG |
90 | |
91 | :end |