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