summaryrefslogtreecommitdiff
path: root/boostcpp.jam
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:21:30 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:21:30 +0900
commitd6a306e745acfee00e81ccaf3324a2a03516db41 (patch)
tree145a26368608982f40ebb0f4836185c44abb9ae4 /boostcpp.jam
parent5ce2ccf2f23c6d3de4c79f216f57ca6f2a18ed16 (diff)
downloadboost-d6a306e745acfee00e81ccaf3324a2a03516db41.tar.gz
boost-d6a306e745acfee00e81ccaf3324a2a03516db41.tar.bz2
boost-d6a306e745acfee00e81ccaf3324a2a03516db41.zip
Imported Upstream version 1.69.0upstream/1.69.0
Diffstat (limited to 'boostcpp.jam')
-rw-r--r--boostcpp.jam152
1 files changed, 66 insertions, 86 deletions
diff --git a/boostcpp.jam b/boostcpp.jam
index c5d5f53ee1..5a6f296cff 100644
--- a/boostcpp.jam
+++ b/boostcpp.jam
@@ -25,6 +25,7 @@ import set ;
import targets ;
import feature ;
import property ;
+import version : version-less ;
##############################################################################
#
@@ -59,6 +60,23 @@ if ! ( $(build-type) in complete minimal )
# What kind of layout are we doing?
layout = [ option.get layout : "" ] ;
+
+layout = [ MATCH (versioned|tagged|system)(-(.+))? : $(layout) ] ;
+if $(layout[3])
+{
+ layout-version = $(layout[3]) ;
+ layout = $(layout[1]) ;
+ if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 66 ]
+ {
+ layout-version = 1.40 ;
+ }
+ else if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 69 ]
+ {
+ layout-version = 1.66 ;
+ }
+}
+layout-version ?= 1.69 ;
+
# On Windows, we used versioned layout by default in order to be compatible with
# autolink. On other systems, we use system layout which is what every other
# program uses. Note that the Windows check is static, and will not be affected
@@ -109,6 +127,46 @@ if $(python-id)
}
+if $(layout) = versioned
+{
+ switch $(layout-version)
+ {
+ case 1.40 :
+ .format-name-args =
+ <base> <toolset> <threading> <runtime> ;
+ case 1.66 :
+ .format-name-args =
+ <base> <toolset> <threading> <runtime> <arch-and-model> ;
+ case 1.69 :
+ .format-name-args =
+ <base> <toolset> <threading> <runtime> <arch-and-model> ;
+ }
+}
+else if $(layout) = tagged
+{
+ switch $(layout-version)
+ {
+ case 1.40 :
+ .format-name-args =
+ <base> <threading> <runtime> ;
+ case 1.66 :
+ .format-name-args =
+ <base> <threading> <runtime> ;
+ case 1.69 :
+ .format-name-args =
+ <base> <threading> <runtime> <arch-and-model> ;
+ }
+}
+else if $(layout) = system
+{
+ .format-name-args = <base> ;
+}
+else
+{
+ .format-name-error = true ;
+}
+
+
################################################################################
#
# 1. 'tag' function adding decorations suitable to the properties if versioned
@@ -120,29 +178,15 @@ rule tag ( name : type ? : property-set )
{
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
{
- local result ;
+ local args = $(.format-name-args) ;
if $(layout) = versioned
{
- result = [ common.format-name
- <base> <toolset> <threading> <runtime> <arch-and-model> -$(BOOST_VERSION_TAG)
- -$(BUILD_ID)
- : $(name) : $(type) : $(property-set) ] ;
+ args += -$(BOOST_VERSION_TAG) ;
}
- else if $(layout) = tagged
- {
- result = [ common.format-name
- <base> <threading> <runtime>
- -$(BUILD_ID)
- : $(name) : $(type) : $(property-set) ] ;
- }
- else if $(layout) = system
- {
- result = [ common.format-name
- <base>
- -$(BUILD_ID)
- : $(name) : $(type) : $(property-set) ] ;
- }
- else
+ local result = [ common.format-name
+ $(args) -$(BUILD_ID)
+ : $(name) : $(type) : $(property-set) ] ;
+ if $(.format-name-error)
{
EXIT error\: invalid layout '$(layout:E=)' ;
}
@@ -184,46 +228,9 @@ rule python-tag ( name : type ? : property-set )
#
# - 'stage-proper' that puts all libraries in stage/lib
# - 'install-proper' that install libraries and headers to system location
-# - 'stage-unversioned' that creates links to libraries without boost version
-# in name
-# - 'install-unversioned' which creates unversioned linked to installed
-# libraries.
#
################################################################################
-# Worker function suitable to the 'generate' metatarget. Creates a link to
-# 'source', striping any version number information from the name.
-rule make-unversioned-links ( project name ? : property-set : sources * )
-{
- local filter ;
- if [ modules.peek : NT ]
- {
- filter = "(.*[.]lib)" ;
- }
- else
- {
- filter =
- "(.*[.]so)[.0-9]*"
- "(.*[.]dylib)"
- "(.*[.]a)" ;
- }
-
- local result ;
- for local s in $(sources)
- {
- local m = [ MATCH "^(.*)-[0-9_]+$(filter)$" : [ $(s).name ] ] ;
- if $(m)
- {
- local ea = [ $(s).action ] ;
- local ep = [ $(ea).properties ] ;
- local a = [ new non-scanning-action $(s) : symlink.ln : $(ep) ] ;
- result += [ new file-target $(m:J=) exact : [ $(s).type ] :
- $(project) : $(a) ] ;
- }
- }
- return $(result) ;
-}
-
rule filtered-target ( name : message + : sources + : requirements * )
{
message $(name)-message : warning\: $(message) ;
@@ -337,33 +344,6 @@ rule declare_install_and_stage_proper_targets ( libraries * : headers * : modula
<install-no-version-symlinks>on
;
$(p).mark-target-as-explicit stage-proper ;
-
- # Commented out as it does not seem to work. Whoever wrote this originally,
- # left some typos in the code, but when that got corrected and the code got
- # enabled - it started reporting ambiguous/duplicate target Boost Build
- # errors. Anyone requiring unversioned staged libraries needs to correct
- # those errors before reenabling this code. For more detailed information
- # see the related Boost library development mailing list thread at
- # 'http://lists.boost.org/Archives/boost/2012/06/194312.php'.
- # (06.07.2012.) (Jurko)
- #~ if $(layout-versioned) && ( [ modules.peek : NT ] || [ modules.peek : UNIX ] )
- #~ {
- #~ generate stage-unversioned : stage-proper :
- #~ <generating-rule>@boostcpp.make-unversioned-links ;
- #~ $(p).mark-target-as-explicit stage-unversioned ;
- #~
- #~ generate install-unversioned : install-proper :
- #~ <generating-rule>@boostcpp.make-unversioned-links ;
- #~ $(p).mark-target-as-explicit install-unversioned ;
- #~ }
- #~ else
- {
- # Create do-nothing aliases.
- alias stage-unversioned ;
- $(p).mark-target-as-explicit stage-unversioned ;
- alias install-unversioned ;
- $(p).mark-target-as-explicit install-unversioned ;
- }
}
@@ -514,11 +494,11 @@ rule declare_top_level_targets ( libraries * : headers * : modular-headers * )
targets.create-metatarget top-level-target : [ project.current ]
: install
- : install-$(modular-headers)-headers install-proper install-unversioned
+ : install-$(modular-headers)-headers install-proper
;
targets.create-metatarget top-level-target : [ project.current ]
: stage
- : stage-proper stage-unversioned headers
+ : stage-proper headers
;
p = [ project.current ] ;