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