build-from-source-head.rst 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .. Copyright David Abrahams 2006. Distributed under the Boost
  2. .. Software License, Version 1.0. (See accompanying
  3. .. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. Boost.Build_ is a text-based system for developing, testing, and
  5. installing software. To use it, you'll need an executable called
  6. ``bjam``.
  7. .. |precompiled-bjam| replace:: download a pre-built ``bjam`` executable
  8. .. _precompiled-bjam: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941
  9. .. .. _Boost.Jam documentation: Boost.Jam_
  10. .. _Boost.Build: ../../tools/build/index.html
  11. .. _Boost.Jam: ../../tools/build/v2/engine/index.html
  12. .. _Boost.Build documentation: Boost.Build_
  13. Get ``bjam``
  14. ............
  15. ``bjam`` is the |command-line tool| that drives the Boost Build
  16. system. To build Boost binaries, you'll invoke ``bjam`` from the
  17. Boost root.
  18. We suggest you |precompiled-bjam|_ for your platform.
  19. Alternatively, you can build ``bjam`` yourself using `these
  20. instructions`__.
  21. __ `building bjam`_
  22. Move the ``bjam`` executable into a directory in your PATH. You can
  23. see the list of directories in your PATH, separated by |pathsep|\ s,
  24. by typing “\ |path|\ ” at the command prompt.
  25. .. _toolset:
  26. .. _toolset-name:
  27. Identify Your Toolset
  28. .....................
  29. First, find the toolset corresponding to your compiler in the
  30. following table (an up-to-date list is always available `in the
  31. Boost.Build documentation`__).
  32. __ http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html
  33. .. Note:: If you previously chose a toolset for the purposes of
  34. `building bjam`_, you should assume it won't work and instead
  35. choose newly from the table below.
  36. .. _building bjam: ../../doc/html/jam/building.html
  37. +-----------+--------------------+-----------------------------+
  38. |Toolset |Vendor |Notes |
  39. |Name | | |
  40. +===========+====================+=============================+
  41. |``acc`` |Hewlett Packard |Only very recent versions are|
  42. | | |known to work well with Boost|
  43. +-----------+--------------------+-----------------------------+
  44. |``borland``|Borland | |
  45. +-----------+--------------------+-----------------------------+
  46. |``como`` |Comeau Computing |Using this toolset may |
  47. | | |require configuring__ another|
  48. | | |toolset to act as its backend|
  49. +-----------+--------------------+-----------------------------+
  50. |``cw`` |Metrowerks/Freescale|The CodeWarrior compiler. We|
  51. | | |have not tested versions of |
  52. | | |this compiler produced since |
  53. | | |it was sold to Freescale. |
  54. +-----------+--------------------+-----------------------------+
  55. |``dmc`` |Digital Mars |As of this Boost release, no |
  56. | | |version of dmc is known to |
  57. | | |handle Boost well. |
  58. +-----------+--------------------+-----------------------------+
  59. |``darwin`` |Apple Computer |Apple's version of the GCC |
  60. | | |toolchain with support for |
  61. | | |Darwin and MacOS X features |
  62. | | |such as frameworks. |
  63. +-----------+--------------------+-----------------------------+
  64. |``gcc`` |The Gnu Project |Includes support for Cygwin |
  65. | | |and MinGW compilers. |
  66. +-----------+--------------------+-----------------------------+
  67. |``hp_cxx`` |Hewlett Packard |Targeted at the Tru64 |
  68. | | |operating system. |
  69. +-----------+--------------------+-----------------------------+
  70. |``intel`` |Intel | |
  71. +-----------+--------------------+-----------------------------+
  72. |``msvc`` |Microsoft | |
  73. +-----------+--------------------+-----------------------------+
  74. |``qcc`` |QNX Software Systems| |
  75. +-----------+--------------------+-----------------------------+
  76. |``sun`` |Sun |Only very recent versions are|
  77. | | |known to work well with |
  78. | | |Boost. |
  79. +-----------+--------------------+-----------------------------+
  80. |``vacpp`` |IBM |The VisualAge C++ compiler. |
  81. +-----------+--------------------+-----------------------------+
  82. __ Boost.Build_
  83. If you have multiple versions of a particular compiler installed,
  84. you can append the version number to the toolset name, preceded by
  85. a hyphen, e.g. ``intel-9.0`` or
  86. ``borland-5.4.3``. |windows-version-name-caveat|
  87. .. _build directory:
  88. .. _build-directory:
  89. Select a Build Directory
  90. ........................
  91. Boost.Build_ will place all intermediate files it generates while
  92. building into the **build directory**. If your Boost root
  93. directory is writable, this step isn't strictly necessary: by
  94. default Boost.Build will create a ``bin.v2/`` subdirectory for that
  95. purpose in your current working directory.
  96. Invoke ``bjam``
  97. ...............
  98. .. |build-directory| replace:: *build-directory*
  99. .. |toolset-name| replace:: *toolset-name*
  100. Change your current directory to the Boost root directory and
  101. invoke ``bjam`` as follows:
  102. .. parsed-literal::
  103. bjam **--build-dir=**\ |build-directory|_ **toolset=**\ |toolset-name|_ |build-type-complete| stage
  104. For a complete description of these and other invocation options,
  105. please see the `Boost.Build documentation`__.
  106. __ http://www.boost.org/boost-build2/doc/html/bbv2/advanced/invocation.html
粤ICP备19079148号