Jamroot 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  1. # Copyright Vladimir Prus 2002-2006.
  2. # Copyright Dave Abrahams 2005-2006.
  3. # Copyright Rene Rivera 2005-2007.
  4. # Copyright Douglas Gregor 2005.
  5. #
  6. # Distributed under the Boost Software License, Version 1.0.
  7. # (See accompanying file LICENSE_1_0.txt or copy at
  8. # http://www.boost.org/LICENSE_1_0.txt)
  9. # Usage:
  10. #
  11. # bjam [options] [properties] [install|stage]
  12. #
  13. # Builds and installs Boost.
  14. #
  15. # Targets and Related Options:
  16. #
  17. # install Install headers and compiled library files to the
  18. # ======= configured locations (below).
  19. #
  20. # --prefix=<PREFIX> Install architecture independent files here.
  21. # Default; C:\Boost on Win32
  22. # Default; /usr/local on Unix. Linux, etc.
  23. #
  24. # --exec-prefix=<EPREFIX> Install architecture dependent files here.
  25. # Default; <PREFIX>
  26. #
  27. # --libdir=<DIR> Install library files here.
  28. # Default; <EPREFIX>/lib
  29. #
  30. # --includedir=<HDRDIR> Install header files here.
  31. # Default; <PREFIX>/include
  32. #
  33. # stage Build and install only compiled library files
  34. # ===== to the stage directory.
  35. #
  36. # --stagedir=<STAGEDIR> Install library files here
  37. # Default; ./stage
  38. #
  39. # Other Options:
  40. #
  41. # --build-type=<type> Build the specified pre-defined set of variations
  42. # of the libraries. Note, that which variants get
  43. # built depends on what each library supports.
  44. #
  45. # minimal (default) - Builds a minimal set of
  46. # variants. On Windows, these are static
  47. # multithreaded libraries in debug and release
  48. # modes, using shared runtime. On Linux, these
  49. # are static and shared multithreaded libraries
  50. # in release mode.
  51. #
  52. # complete - Build all possible variations.
  53. #
  54. # --build-dir=DIR Build in this location instead of building
  55. # within the distribution tree. Recommended!
  56. #
  57. # --show-libraries Displays the list of Boost libraries that require
  58. # build and installation steps, then exit.
  59. #
  60. # --layout=<layout> Determines whether to choose library names
  61. # and header locations such that multiple
  62. # versions of Boost or multiple compilers can
  63. # be used on the same system.
  64. #
  65. # versioned - Names of boost binaries
  66. # include the Boost version number, name and
  67. # version of the compiler and encoded build
  68. # properties. Boost headers are installed in a
  69. # subdirectory of <HDRDIR> whose name contains
  70. # the Boost version number.
  71. #
  72. # tagged -- Names of boost binaries include the
  73. # encoded build properties such as variant and
  74. # threading, but do not including compiler name
  75. # and version, or Boost version. This option is
  76. # useful if you build several variants of Boost,
  77. # using the same compiler.
  78. #
  79. # system - Binaries names do not include the
  80. # Boost version number or the name and version
  81. # number of the compiler. Boost headers are
  82. # installed directly into <HDRDIR>. This option
  83. # is intended for system integrators who are
  84. # building distribution packages.
  85. #
  86. # The default value is 'versioned' on Windows, and
  87. # 'system' on Unix.
  88. #
  89. # --buildid=ID Adds the specified ID to the name of built
  90. # libraries. The default is to not add anything.
  91. #
  92. # --help This message.
  93. #
  94. # --with-<library> Build and install the specified <library>
  95. # If this option is used, only libraries
  96. # specified using this option will be built.
  97. #
  98. # --without-<library> Do not build, stage, or install the specified
  99. # <library>. By default, all libraries are built.
  100. #
  101. # Properties:
  102. #
  103. # toolset=toolset Indicates the toolset to build with.
  104. #
  105. # variant=debug|release Select the build variant
  106. #
  107. # link=static|shared Whether to build static or shared libraries
  108. #
  109. # threading=single|multi Whether to build single or multithreaded binaries
  110. #
  111. # runtime-link=static|shared
  112. # Whether to link to static or shared C and C++ runtime.
  113. #
  114. # TODO:
  115. # - handle boost version
  116. # - handle python options such as pydebug
  117. import generate ;
  118. import modules ;
  119. import set ;
  120. import stage ;
  121. import package ;
  122. import path ;
  123. import common ;
  124. import os ;
  125. import regex ;
  126. import errors ;
  127. import "class" : new ;
  128. import common ;
  129. import sequence ;
  130. import symlink ;
  131. import targets ;
  132. import project ;
  133. import option ;
  134. import xsltproc ;
  135. path-constant BOOST_ROOT : . ;
  136. constant BOOST_VERSION : 1.42.0 ;
  137. constant BOOST_JAMROOT_MODULE : $(__name__) ;
  138. local version-tag = [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(BOOST_VERSION) ]
  139. ;
  140. if $(version-tag[3]) = 0
  141. {
  142. version-tag = $(version-tag[1-2]) ;
  143. }
  144. constant BOOST_VERSION_TAG : $(version-tag:J="_") ;
  145. # Option to choose how many variants to build. The default is "minimal".
  146. local build-type = [ MATCH "^--build-type=(.*)" : [ modules.peek : ARGV ] ] ;
  147. build-type ?= minimal ;
  148. if ! ( $(build-type) in minimal complete )
  149. {
  150. ECHO "The value of the --build-type option should be either 'complete' or 'minimal'" ;
  151. EXIT ;
  152. }
  153. rule handle-static-runtime ( properties * )
  154. {
  155. # Using static runtime with shared libraries is impossible on Linux,
  156. # and dangerous on Windows. Therefore, we disallow it. This might
  157. # be drastic, but it was disabled for a while with nobody complaining.
  158. # For CW, static runtime is needed so that std::locale works.
  159. if <link>shared in $(properties) && <runtime-link>static in $(properties) &&
  160. ! ( <toolset>cw in $(properties) )
  161. {
  162. ECHO "error: link=shared together with runtime-link=static is not allowed" ;
  163. ECHO "error: such property combination is either impossible " ;
  164. ECHO "error: or too dangerious to be of any use" ;
  165. EXIT ;
  166. }
  167. }
  168. project boost
  169. : requirements <include>.
  170. # Disable auto-linking for all targets here, primarily because it caused
  171. # troubles with V2.
  172. <define>BOOST_ALL_NO_LIB=1
  173. # Used to encode variant in target name. See the 'tag' rule below.
  174. <tag>@$(__name__).tag
  175. <conditional>@handle-static-runtime
  176. # The standard library Sun compilers use by default has no chance
  177. # of working with Boost. Override it.
  178. <toolset>sun:<stdlib>sun-stlport
  179. # Comeau does not support shared lib
  180. <toolset>como:<link>static
  181. <toolset>como-linux:<define>_GNU_SOURCE=1
  182. # When building docs within Boost, we want the Boost standard navbar
  183. <xsl:param>nav.layout=horizontal
  184. <xsl:param>boost.image=Boost
  185. : usage-requirements <include>.
  186. : build-dir bin.v2
  187. ;
  188. # Setup convenient aliases for all libraries.
  189. all-libraries = [ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ]
  190. [ glob libs/*/build/Jamfile ] ]
  191. ;
  192. all-libraries = [ sequence.unique $(all-libraries) ] ;
  193. # The function_types library has a Jamfile, but it's used for maintenance
  194. # purposes, there's no library to build and install.
  195. all-libraries = [ set.difference $(all-libraries) : function_types ] ;
  196. local rule explicit-alias ( id : targets + )
  197. {
  198. alias $(id) : $(targets) ;
  199. explicit $(id) ;
  200. }
  201. # First, the complicated libraries: where the target name in Jamfile is
  202. # different from its directory name.
  203. explicit-alias prg_exec_monitor : libs/test/build//boost_prg_exec_monitor ;
  204. explicit-alias test_exec_monitor : libs/test/build//boost_test_exec_monitor ;
  205. explicit-alias unit_test_framework : libs/test/build//boost_unit_test_framework ;
  206. explicit-alias bgl-vis : libs/graps/build//bgl-vis ;
  207. explicit-alias serialization : libs/serialization/build//boost_serialization ;
  208. explicit-alias wserialization : libs/serialization/build//boost_wserialization ;
  209. for local l in $(all-libraries)
  210. {
  211. if ! $(l) in test graph serialization
  212. {
  213. explicit-alias $(l) : libs/$(l)/build//boost_$(l) ;
  214. }
  215. }
  216. alias headers : : : : <include>. ;
  217. # Decides which libraries are to be installed by looking at --with-<library>
  218. # --without-<library> arguments. Returns the list of directories under "libs"
  219. # which must be built and installed.
  220. #
  221. rule libraries-to-install ( existing-libraries * )
  222. {
  223. local argv = [ modules.peek : ARGV ] ;
  224. local with-parameter = [ MATCH --with-(.*) : $(argv) ] ;
  225. local without-parameter = [ MATCH --without-(.*) : $(argv) ] ;
  226. if ! $(with-parameter) && ! $(without-parameter)
  227. {
  228. # Nothing is specified on command line. See if maybe
  229. # project-config.jam has some choices.
  230. local project-config-libs = [ modules.peek project-config : libraries ] ;
  231. with-parameter = [ MATCH --with-(.*) : $(project-config-libs) ] ;
  232. without-parameter = [ MATCH --without-(.*) : $(project-config-libs) ] ;
  233. }
  234. # Do some checks.
  235. if $(with-parameter) && $(without-parameter)
  236. {
  237. ECHO "error: both --with-<library> and --without-<library> specified" ;
  238. EXIT ;
  239. }
  240. local wrong = [ set.difference $(with-parameter) : $(existing-libraries) ] ;
  241. if $(wrong)
  242. {
  243. ECHO "error: wrong library name '$(wrong[1])' in the --with-<library> option." ;
  244. EXIT ;
  245. }
  246. local wrong = [ set.difference $(without-parameter) : $(existing-libraries) ] ;
  247. if $(wrong)
  248. {
  249. ECHO "error: wrong library name '$(wrong[1])' in the --without-<library> option." ;
  250. EXIT ;
  251. }
  252. if $(with-parameter)
  253. {
  254. return [ set.intersection $(existing-libraries) : $(with-parameter) ] ;
  255. }
  256. else
  257. {
  258. return [ set.difference $(existing-libraries) : $(without-parameter) ] ;
  259. }
  260. }
  261. # What kind of layout are we doing?
  262. layout = [ option.get layout : "" ] ;
  263. # On Windows, we used versioned layout by default in order to
  264. # be compatible with autolink. On other systems, we use system
  265. # layout which is what every other program uses. Note that windows
  266. # check is static, and won't
  267. if ! $(layout)
  268. {
  269. if [ modules.peek : NT ]
  270. {
  271. layout = versioned ;
  272. }
  273. else
  274. {
  275. layout = system ;
  276. }
  277. }
  278. layout-$(layout) = true ;
  279. if $(layout) = system && $(build-type) = complete
  280. {
  281. ECHO "error: Cannot use --layout=system with --build-type complete." ;
  282. ECHO "error: Please used either --layout=versioned or --layout=tagged " ;
  283. ECHO "error: if you wish to build multiple variants." ;
  284. if ! [ modules.peek : NT ]
  285. {
  286. ECHO "error: Note that --layout=system is default on Unix starting with Boost 1.40." ;
  287. }
  288. EXIT ;
  289. }
  290. # Possible stage only location.
  291. local stage-locate = [ MATCH "^--stagedir=(.*)" : [ modules.peek : ARGV ] ] ;
  292. stage-locate ?= stage ;
  293. path-constant BOOST_STAGE_LOCATE : $(stage-locate) ;
  294. # Python location.
  295. local python-root = [ MATCH "^--with-python-root=(.*)" : [ modules.peek : ARGV ]
  296. ] ;
  297. PYTHON_ROOT ?= $(python-root) ;
  298. # Select the libraries to install.
  299. libraries = [ libraries-to-install $(all-libraries) ] ;
  300. if --show-libraries in [ modules.peek : ARGV ]
  301. {
  302. ECHO "The following libraries require building:" ;
  303. for local l in $(libraries)
  304. {
  305. ECHO " - $(l)" ;
  306. }
  307. EXIT ;
  308. }
  309. # Custom build ID.
  310. local build-id = [ MATCH "^--buildid=(.*)" : [ modules.peek : ARGV ] ] ;
  311. if $(build-id)
  312. {
  313. constant BUILD_ID : [ regex.replace $(build-id) "[*\\/:.\"\' ]" "_" ] ;
  314. }
  315. # This rule is called by Boost.Build to determine the name of target. We use it
  316. # to encode the build variant, compiler name and boost version in the target
  317. # name.
  318. #
  319. rule tag ( name : type ? : property-set )
  320. {
  321. if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
  322. {
  323. local result ;
  324. if $(layout) = versioned
  325. {
  326. result = [ common.format-name
  327. <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
  328. -$(BUILD_ID)
  329. : $(name) : $(type) : $(property-set) ] ;
  330. }
  331. else if $(layout) = tagged
  332. {
  333. result = [ common.format-name
  334. <base> <threading> <runtime>
  335. -$(BUILD_ID)
  336. : $(name) : $(type) : $(property-set) ] ;
  337. }
  338. else if $(layout) = system
  339. {
  340. result = [ common.format-name
  341. <base>
  342. -$(BUILD_ID)
  343. : $(name) : $(type) : $(property-set) ] ;
  344. }
  345. else
  346. {
  347. ECHO "error: invalid layout '$(layout)'" ;
  348. EXIT ;
  349. }
  350. # Optionally add version suffix. On NT, library with version suffix
  351. # will not be recognized by linkers. On CYGWIN, we get strage
  352. # duplicate symbol errors when library is generated with version
  353. # suffix. On OSX, version suffix is not needed -- the linker expects
  354. # the libFoo.1.2.3.dylib format. AIX linkers do not accept version
  355. # suffixes either. Pgi compilers can not accept library with version
  356. # suffix.
  357. if $(type) = SHARED_LIB &&
  358. ( ! ( [ $(property-set).get <target-os> ] in windows cygwin darwin aix ) &&
  359. ! ( [ $(property-set).get <toolset> ] in pgi ) )
  360. {
  361. result = $(result).$(BOOST_VERSION) ;
  362. }
  363. return $(result) ;
  364. }
  365. }
  366. # Install to system location.
  367. install-requirements = <install-source-root>$(BOOST_ROOT)/boost ;
  368. if $(layout-versioned)
  369. {
  370. install-requirements += <install-header-subdir>boost-$(BOOST_VERSION_TAG)/boost ;
  371. }
  372. else
  373. {
  374. install-requirements += <install-header-subdir>boost ;
  375. }
  376. if [ modules.peek : NT ]
  377. {
  378. install-requirements += <install-default-prefix>C:/Boost ;
  379. }
  380. else if [ modules.peek : UNIX ]
  381. {
  382. install-requirements += <install-default-prefix>/usr/local ;
  383. }
  384. local headers =
  385. # The .SUNWCCh files are present in tr1 include directory and have to be installed,
  386. # see http://lists.boost.org/Archives/boost/2007/05/121430.php
  387. [ path.glob-tree $(BOOST_ROOT)/boost : *.hpp *.ipp *.h *.inc *.SUNWCCh : CVS .svn ]
  388. [ path.glob-tree $(BOOST_ROOT)/boost/compatibility/cpp_c_headers : c* : CVS .svn ]
  389. [ path.glob boost/tr1/tr1 : * : bcc32 sun CVS .svn ]
  390. ;
  391. # Complete install.
  392. package.install install-proper
  393. : $(install-requirements) <install-no-version-symlinks>on
  394. :
  395. : libs/$(libraries)/build
  396. : $(headers)
  397. ;
  398. explicit install-proper ;
  399. # Install just library.
  400. install stage-proper
  401. : libs/$(libraries)/build
  402. : <location>$(stage-locate)/lib
  403. <install-dependencies>on <install-type>LIB
  404. <install-no-version-symlinks>on
  405. ;
  406. explicit stage-proper ;
  407. if $(layout-versioned) && ( [ modules.peek : NT ] || [ modules.peek : UNIX ] )
  408. {
  409. rule make-unversioned-links ( project name ? : property-set : sources * )
  410. {
  411. local result ;
  412. local filtered ;
  413. local pattern ;
  414. local nt = [ modules.peek : NT ] ;
  415. # Collect the libraries that have the version number in 'filtered'.
  416. for local s in $(sources)
  417. {
  418. local m ;
  419. if $(nt)
  420. {
  421. m = [ MATCH "(.*[.]lib)" : [ $(s).name ] ] ;
  422. }
  423. else
  424. {
  425. m = [ MATCH "(.*[.]so[.0-9]+)" "(.*[.]dylib)" "(.*[.]a)" :
  426. [ $(s).name ] ] ;
  427. }
  428. if $(m)
  429. {
  430. filtered += $(s) ;
  431. }
  432. }
  433. # Create links without version.
  434. for local s in $(filtered)
  435. {
  436. local name = [ $(s).name ] ;
  437. local ea = [ $(s).action ] ;
  438. local ep = [ $(ea).properties ] ;
  439. local a = [ new non-scanning-action $(s) : symlink.ln : $(ep) ] ;
  440. local noversion-file ;
  441. if $(nt)
  442. {
  443. noversion-file = [ MATCH "(.*)-[0-9_]+(.*[.]lib)" : $(name) ] ;
  444. }
  445. else
  446. {
  447. noversion-file =
  448. [ MATCH "(.*)-[0-9_]+(.*[.]so)[.0-9]*" : $(name) ]
  449. [ MATCH "(.*)-[0-9_]+(.*[.]dylib)" : $(name) ]
  450. [ MATCH "(.*)-[0-9_]+(.*[.]a)" : $(name) ]
  451. [ MATCH "(.*)-[0-9_]+(.*[.]dll[.]a)" : $(name) ] ;
  452. }
  453. local new-name =
  454. $(noversion-file[1])$(noversion-file[2]) ;
  455. result += [ new file-target $(new-name) exact : [ $(s).type ] : $(project)
  456. : $(a) ] ;
  457. }
  458. return $(result) ;
  459. }
  460. generate stage-unversioned : stage-proper :
  461. <generating-rule>@make-unversioned-links ;
  462. explicit stage-unversioned ;
  463. generate install-unversioned : install-proper :
  464. <generating-rule>@make-unversioned-links ;
  465. explicit install-unversioned ;
  466. }
  467. else
  468. {
  469. # Create do-nothing aliases.
  470. alias stage-unversioned ;
  471. explicit stage-unversioned ;
  472. alias install-unversioned ;
  473. explicit install-unversioned ;
  474. }
  475. # This is a special metatarget class that handles the --build-type=complete
  476. # option.
  477. class top-level-target : alias-target-class
  478. {
  479. import modules ;
  480. import errors ;
  481. rule __init__ ( name : project : sources * : requirements *
  482. : default-build * : usage-requirements * )
  483. {
  484. alias-target-class.__init__ $(name) : $(project) : $(sources) :
  485. $(requirements) : $(default-build) : $(usage-requirements) ;
  486. local m = [ $(project).project-module ] ;
  487. self.build-type = [ modules.peek $(m) : build-type ] ;
  488. # On Linux, we build release variant by default, since few users will
  489. # ever want to debug C++ Boost libraries, and there's no ABI
  490. # incompatibility between debug and release variants. We build
  491. # shared and static libraries since that's what most packages
  492. # seem to provide (.so in libfoo and .a in libfoo-dev).
  493. self.minimal-properties = [ property-set.create
  494. <variant>release <threading>multi <link>shared <link>static <runtime-link>shared ] ;
  495. # On Windows, new IDE projects use:
  496. #
  497. # runtime-link=dynamic, threading=multi, variant=(debug|release)
  498. #
  499. # and in addition, C++ Boost's autolink defaults to static linking.
  500. self.minimal-properties-win = [ property-set.create
  501. <variant>debug <variant>release <threading>multi <link>static <runtime-link>shared ] ;
  502. self.complete-properties = [ property-set.create
  503. <variant>debug <variant>release
  504. <threading>single <threading>multi
  505. <link>shared <link>static
  506. <runtime-link>shared <runtime-link>static ] ;
  507. }
  508. rule generate ( property-set )
  509. {
  510. if $(self.build-type) = minimal
  511. {
  512. local expanded ;
  513. local os = [ $(property-set).get <target-os> ] ;
  514. # Because we completely override parent's 'generate'
  515. # we need to check for default value of feature ourself.
  516. if ! $(os)
  517. {
  518. os = [ feature.defaults <target-os> ] ;
  519. os = $(os:G=) ;
  520. }
  521. if $(os) = windows
  522. {
  523. expanded = [ targets.apply-default-build $(property-set)
  524. : $(self.minimal-properties-win) ] ;
  525. }
  526. else
  527. {
  528. expanded = [ targets.apply-default-build $(property-set)
  529. : $(self.minimal-properties) ] ;
  530. }
  531. return [ build-multiple $(expanded) ] ;
  532. }
  533. else if $(self.build-type) = complete
  534. {
  535. local expanded = [ targets.apply-default-build $(property-set)
  536. : $(self.complete-properties) ] ;
  537. # Filter inappopriate combinations
  538. local filtered ;
  539. for local p in $(expanded)
  540. {
  541. # See comment in handle-static-runtime regarding this logic.
  542. if [ $(p).get <link> ] = shared && [ $(p).get <runtime-link> ] = static
  543. && [ $(p).get <toolset> ] != cw
  544. {
  545. # Skip this
  546. }
  547. else
  548. {
  549. filtered += $(p) ;
  550. }
  551. }
  552. return [ build-multiple $(filtered) ] ;
  553. }
  554. else
  555. {
  556. errors.error "Unknown build type" ;
  557. }
  558. }
  559. rule build-multiple ( property-sets * )
  560. {
  561. local usage-requirements = [ property-set.empty ] ;
  562. local result ;
  563. for local p in $(property-sets)
  564. {
  565. local r = [ alias-target-class.generate $(p) ] ;
  566. if $(r)
  567. {
  568. usage-requirements = [ $(usage-requirements).add $(r[1]) ] ;
  569. result += $(r[2-]) ;
  570. }
  571. }
  572. return $(usage-requirements) [ sequence.unique $(result) ] ;
  573. }
  574. }
  575. targets.create-metatarget top-level-target : [ project.current ]
  576. : install
  577. : install-proper install-unversioned
  578. ;
  579. targets.create-metatarget top-level-target : [ project.current ]
  580. : stage
  581. : stage-proper stage-unversioned
  582. ;
  583. explicit install ;
  584. explicit stage ;
  585. stage-abs = [ path.native [ path.root $(stage-locate)/lib [ path.pwd ] ] ] ;
  586. # This target is built by default, and will forward to 'stage'
  587. # after producing some explanations.
  588. targets.create-metatarget top-level-target : [ project.current ]
  589. : forward
  590. : explain stage
  591. ;
  592. message explain :
  593. "\nBuilding the Boost C++ Libraries.
  594. After the build, the headers will be located at
  595. $(BOOST_ROOT)
  596. The libraries will be located at
  597. $(stage-abs)
  598. Use 'bjam install --prefix=<path>' if you wish to install headers and
  599. libraries to a different location and remove the source tree.\n\n"
  600. ;
  601. # This rule should be called from libraries' Jamfiles and will create two
  602. # targets, "install" and "stage", that will install or stage that library. The
  603. # --prefix option is respected, but --with and --without options, naturally, are
  604. # ignored.
  605. #
  606. # - libraries -- list of library targets to install.
  607. #
  608. rule boost-install ( libraries * )
  609. {
  610. package.install install
  611. : <dependency>/boost//install-proper-headers $(install-requirements)
  612. : # No binaries
  613. : $(libraries)
  614. : # No headers, it is handled by the dependency.
  615. ;
  616. install stage : $(libraries) : <location>$(BOOST_STAGE_LOCATE) ;
  617. local c = [ project.current ] ;
  618. local project-module = [ $(c).project-module ] ;
  619. module $(project-module)
  620. {
  621. explicit stage ;
  622. explicit install ;
  623. }
  624. }
  625. # Make project ids of all libraries known.
  626. for local l in $(all-libraries)
  627. {
  628. use-project /boost/$(l) : libs/$(l)/build ;
  629. }
粤ICP备19079148号