mirror of
https://github.com/boostorg/boost.git
synced 2025-04-06 22:14:59 +00:00
Boost library build system code cleanup - refactored the make-unversioned-links() rule.
[SVN r78939]
This commit is contained in:
parent
3c6b91c702
commit
6a8c372f92
1 changed files with 19 additions and 44 deletions
63
boostcpp.jam
63
boostcpp.jam
|
@ -180,56 +180,31 @@ rule tag ( name : type ? : property-set )
|
|||
# 'source', striping any version number information from the name.
|
||||
rule make-unversioned-links ( project name ? : property-set : sources * )
|
||||
{
|
||||
local result ;
|
||||
local filtered ;
|
||||
local pattern ;
|
||||
local nt = [ modules.peek : NT ] ;
|
||||
|
||||
# Collect the libraries that have the version number in 'filtered'.
|
||||
for local s in $(sources)
|
||||
local filter ;
|
||||
if [ modules.peek : NT ]
|
||||
{
|
||||
local m ;
|
||||
if $(nt)
|
||||
{
|
||||
m = [ MATCH "(.*[.]lib)" : [ $(s).name ] ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
m = [ MATCH "(.*[.]so[.0-9]+)" "(.*[.]dylib)" "(.*[.]a)" :
|
||||
[ $(s).name ] ] ;
|
||||
}
|
||||
if $(m)
|
||||
{
|
||||
filtered += $(s) ;
|
||||
}
|
||||
filter = (.*[.]lib) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
filter =
|
||||
(.*[.]so)[.0-9]*
|
||||
(.*[.]dylib)
|
||||
(.*[.]a) ;
|
||||
}
|
||||
|
||||
# Create links without version.
|
||||
for local s in $(filtered)
|
||||
local result ;
|
||||
for local s in $(sources)
|
||||
{
|
||||
local name = [ $(s).name ] ;
|
||||
local ea = [ $(s).action ] ;
|
||||
local ep = [ $(ea).properties ] ;
|
||||
local a = [ new non-scanning-action $(s) : symlink.ln : $(ep) ] ;
|
||||
|
||||
local noversion-file ;
|
||||
if $(nt)
|
||||
local m = [ MATCH ^(.*)-[0-9_]+$(filter)$ : [ $(s).name ] ] ;
|
||||
if $(m)
|
||||
{
|
||||
noversion-file = [ MATCH "(.*)-[0-9_]+(.*[.]lib)" : $(name) ] ;
|
||||
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) ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
noversion-file =
|
||||
[ MATCH "(.*)-[0-9_]+(.*[.]so)[.0-9]*" : $(name) ]
|
||||
[ MATCH "(.*)-[0-9_]+(.*[.]dylib)" : $(name) ]
|
||||
[ MATCH "(.*)-[0-9_]+(.*[.]a)" : $(name) ]
|
||||
[ MATCH "(.*)-[0-9_]+(.*[.]dll[.]a)" : $(name) ] ;
|
||||
}
|
||||
|
||||
local new-name =
|
||||
$(noversion-file[1])$(noversion-file[2]) ;
|
||||
result += [ new file-target $(new-name) exact : [ $(s).type ] :
|
||||
$(project) : $(a) ] ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue