summaryrefslogtreecommitdiff
path: root/boostcpp.jam
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:12:59 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:12:59 +0900
commitb8cf34c691623e4ec329053cbbf68522a855882d (patch)
tree34da08632a99677f6b79ecb65e5b655a5b69a67f /boostcpp.jam
parent3fdc3e5ee96dca5b11d1694975a65200787eab86 (diff)
downloadboost-upstream/1.67.0.tar.gz
boost-upstream/1.67.0.tar.bz2
boost-upstream/1.67.0.zip
Imported Upstream version 1.67.0upstream/1.67.0
Diffstat (limited to 'boostcpp.jam')
-rw-r--r--boostcpp.jam133
1 files changed, 73 insertions, 60 deletions
diff --git a/boostcpp.jam b/boostcpp.jam
index 85a4cb323f..c5d5f53ee1 100644
--- a/boostcpp.jam
+++ b/boostcpp.jam
@@ -20,6 +20,7 @@ import package ;
import path ;
import project ;
import regex ;
+import sequence ;
import set ;
import targets ;
import feature ;
@@ -38,8 +39,8 @@ rule set-version ( version )
{
BOOST_VERSION = $(version) ;
- local version-tag = [ MATCH ^([^.]+)[.]([^.]+)[.]([^.]+) : $(BOOST_VERSION)
- ] ;
+ local version-tag =
+ [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(BOOST_VERSION) ] ;
if $(version-tag[3]) = 0
{
version-tag = $(version-tag[1-2]) ;
@@ -77,12 +78,12 @@ layout-$(layout) = true ;
if $(layout) = system && $(build-type) = complete
{
- ECHO error: Cannot use --layout=system with --build-type complete. ;
- ECHO error: Please use either --layout=versioned or --layout=tagged ;
- ECHO error: if you wish to build multiple variants. ;
+ ECHO error\: Cannot use --layout=system with --build-type complete. ;
+ ECHO error\: Please use either --layout=versioned or --layout=tagged ;
+ ECHO error\: if you wish to build multiple variants. ;
if [ os.name ] != NT
{
- ECHO error: Note that --layout=system is used by default on Unix
+ ECHO error\: Note that --layout=system is used by default on Unix
starting with Boost 1.40. ;
}
EXIT ;
@@ -104,7 +105,7 @@ if $(build-id)
python-id = [ option.get "python-buildid" ] ;
if $(python-id)
{
- PYTHON_ID = [ regex.replace $(python-id) [*\\/:.\"\'] _ ] ;
+ PYTHON_ID = [ regex.replace $(python-id) "[*\\/:.\"\']" _ ] ;
}
@@ -143,7 +144,7 @@ rule tag ( name : type ? : property-set )
}
else
{
- EXIT error: invalid layout '$(layout:E=)' ;
+ EXIT error\: invalid layout '$(layout:E=)' ;
}
# Optionally add version suffix. On NT, library with version suffix will
@@ -197,20 +198,20 @@ rule make-unversioned-links ( project name ? : property-set : sources * )
local filter ;
if [ modules.peek : NT ]
{
- filter = (.*[.]lib) ;
+ filter = "(.*[.]lib)" ;
}
else
{
filter =
- (.*[.]so)[.0-9]*
- (.*[.]dylib)
- (.*[.]a) ;
+ "(.*[.]so)[.0-9]*"
+ "(.*[.]dylib)"
+ "(.*[.]a)" ;
}
local result ;
for local s in $(sources)
{
- local m = [ MATCH ^(.*)-[0-9_]+$(filter)$ : [ $(s).name ] ] ;
+ local m = [ MATCH "^(.*)-[0-9_]+$(filter)$" : [ $(s).name ] ] ;
if $(m)
{
local ea = [ $(s).action ] ;
@@ -225,7 +226,7 @@ rule make-unversioned-links ( project name ? : property-set : sources * )
rule filtered-target ( name : message + : sources + : requirements * )
{
- message $(name)-message : warning: $(message) ;
+ message $(name)-message : warning\: $(message) ;
alias $(name) : $(sources) : $(requirements) ;
alias $(name) : $(name)-message ;
@@ -234,7 +235,7 @@ rule filtered-target ( name : message + : sources + : requirements * )
$(p).mark-target-as-explicit $(name)-message ;
}
-rule declare_install_and_stage_proper_targets ( libraries * : headers * )
+rule declare_install_and_stage_proper_targets ( libraries * : headers * : modular-headers * )
{
local p = [ project.current ] ;
for local l in $(libraries)
@@ -265,7 +266,7 @@ rule declare_install_and_stage_proper_targets ( libraries * : headers * )
}
local library-targets = $(libraries)-for-install ;
- install-requirements = <install-source-root>$(BOOST_ROOT)/boost ;
+ local install-requirements ;
if $(layout-versioned)
{
@@ -288,9 +289,40 @@ rule declare_install_and_stage_proper_targets ( libraries * : headers * )
p = [ project.current ] ;
+ # These headers will be installed from the modular
+ # layout, and should be ignored in the global boost/
+ local skip-headers ;
+ # Install modular headers.
+ for local lib in $(modular-headers)
+ {
+ local header-root = $(BOOST_ROOT)/libs/$(lib)/include/boost ;
+ local lib-headers =
+ [ path.glob-tree $(header-root) : *.hpp *.ipp *.h *.inc *.SUNWCCh : CVS .svn ]
+ [ path.glob-tree $(header-root)/compatibility/cpp_c_headers : c* : CVS .svn ]
+ [ path.glob $(header-root)/tr1/tr1 : * : bcc32 sun CVS .svn ]
+ ;
+ skip-headers += [ sequence.transform path.relative-to [ path.make $(header-root) ] : $(lib-headers) ] ;
+ package.install install-$(lib)-headers
+ : <install-source-root>$(header-root)
+ $(install-requirements)
+ <install-no-version-symlinks>on
+ : # binaries
+ : # libraries
+ : $(lib-headers)
+ ;
+ $(p).mark-target-as-explicit install-$(lib)-headers ;
+ }
+
+ # Filter out headers that were created by b2 headers
+ local header-root = [ path.make $(BOOST_ROOT)/boost ] ;
+ headers = [ set.difference $(headers) : $(header-root)/$(skip-headers) ] ;
+
# Complete install.
package.install install-proper
- : $(install-requirements) <install-no-version-symlinks>on
+ : <install-source-root>$(BOOST_ROOT)/boost
+ $(install-requirements)
+ <install-no-version-symlinks>on
+
:
: $(libraries)-for-install
: $(headers)
@@ -476,17 +508,17 @@ class top-level-target : alias-target-class
}
}
-rule declare_top_level_targets ( libraries * : headers * )
+rule declare_top_level_targets ( libraries * : headers * : modular-headers * )
{
- declare_install_and_stage_proper_targets $(libraries) : $(headers) ;
+ declare_install_and_stage_proper_targets $(libraries) : $(headers) : $(modular-headers) ;
targets.create-metatarget top-level-target : [ project.current ]
: install
- : install-proper install-unversioned
+ : install-$(modular-headers)-headers install-proper install-unversioned
;
targets.create-metatarget top-level-target : [ project.current ]
: stage
- : stage-proper stage-unversioned
+ : stage-proper stage-unversioned headers
;
p = [ project.current ] ;
@@ -585,19 +617,19 @@ rule libraries-to-install ( existing-libs * )
# Do some checks.
if $(with-parameter) && $(without-parameter)
{
- EXIT error: both --with-<library> and --without-<library> specified ;
+ EXIT error\: both --with-<library> and --without-<library> specified ;
}
local wrong = [ set.difference $(with-parameter) : $(existing-libs) ] ;
if $(wrong)
{
- EXIT error: wrong library name '$(wrong[1])' in the --with-<library>
+ EXIT error\: wrong library name '$(wrong[1])' in the --with-<library>
option. ;
}
local wrong = [ set.difference $(without-parameter) : $(existing-libs) ] ;
if $(wrong)
{
- EXIT error: wrong library name '$(wrong[1])' in the --without-<library>
+ EXIT error\: wrong library name '$(wrong[1])' in the --without-<library>
option. ;
}
@@ -611,7 +643,7 @@ rule libraries-to-install ( existing-libs * )
}
}
-rule declare-targets ( all-libraries * : headers * )
+rule declare-targets ( all-libraries * : headers * : modular-headers * )
{
configure.register-components $(all-libraries) ;
@@ -621,7 +653,7 @@ rule declare-targets ( all-libraries * : headers * )
if [ option.get "show-libraries" : : true ]
{
- ECHO The following libraries require building: ;
+ ECHO The following libraries require building\: ;
for local l in $(libraries)
{
ECHO " - $(l)" ;
@@ -629,7 +661,7 @@ rule declare-targets ( all-libraries * : headers * )
EXIT ;
}
- declare_top_level_targets $(libraries) : $(headers) ;
+ declare_top_level_targets $(libraries) : $(headers) : $(modular-headers) ;
}
# Returns the properties identifying the toolset. We'll use them
@@ -652,15 +684,11 @@ rule deduce-address-model ( properties * )
{
local result ;
local filtered = [ toolset-properties $(properties) ] ;
-
- if [ configure.builds /boost/architecture//32 : $(filtered) : 32-bit ]
- {
- result = 32 ;
- }
- else if [ configure.builds /boost/architecture//64 : $(filtered) : 64-bit ]
- {
- result = 64 ;
- }
+ local names = 32 64 ;
+ local idx = [ configure.find-builds "default address-model" : $(filtered)
+ : /boost/architecture//32 "32-bit"
+ : /boost/architecture//64 "64-bit" ] ;
+ result = $(names[$(idx)]) ;
if $(result)
{
@@ -689,30 +717,15 @@ rule deduce-architecture ( properties * )
{
local result ;
local filtered = [ toolset-properties $(properties) ] ;
- if [ configure.builds /boost/architecture//arm : $(filtered) : arm ]
- {
- result = arm ;
- }
- else if [ configure.builds /boost/architecture//mips1 : $(filtered) : mips1 ]
- {
- result = mips1 ;
- }
- else if [ configure.builds /boost/architecture//power : $(filtered) : power ]
- {
- result = power ;
- }
- else if [ configure.builds /boost/architecture//sparc : $(filtered) : sparc ]
- {
- result = sparc ;
- }
- else if [ configure.builds /boost/architecture//x86 : $(filtered) : x86 ]
- {
- result = x86 ;
- }
- else if [ configure.builds /boost/architecture//combined : $(filtered) : combined ]
- {
- result = combined ;
- }
+ local names = arm mips1 power sparc x86 combined ;
+ local idx = [ configure.find-builds "default architecture" : $(filtered)
+ : /boost/architecture//arm
+ : /boost/architecture//mips1
+ : /boost/architecture//power
+ : /boost/architecture//sparc
+ : /boost/architecture//x86
+ : /boost/architecture//combined ] ;
+ result = $(names[$(idx)]) ;
if $(result)
{