1
0

bootstrap.bat 2.9 KB

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