summaryrefslogtreecommitdiff
path: root/boostcpp.jam
diff options
context:
space:
mode:
Diffstat (limited to 'boostcpp.jam')
-rw-r--r--boostcpp.jam63
1 files changed, 19 insertions, 44 deletions
diff --git a/boostcpp.jam b/boostcpp.jam
index 20be095291..4ad461b4c7 100644
--- a/boostcpp.jam
+++ b/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) ;
}
-
- # Create links without version.
- for local s in $(filtered)
+ else
{
- local name = [ $(s).name ] ;
- local ea = [ $(s).action ] ;
- local ep = [ $(ea).properties ] ;
- local a = [ new non-scanning-action $(s) : symlink.ln : $(ep) ] ;
+ filter =
+ (.*[.]so)[.0-9]*
+ (.*[.]dylib)
+ (.*[.]a) ;
+ }
- local noversion-file ;
- if $(nt)
- {
- noversion-file = [ MATCH "(.*)-[0-9_]+(.*[.]lib)" : $(name) ] ;
- }
- else
+ local result ;
+ for local s in $(sources)
+ {
+ local m = [ MATCH ^(.*)-[0-9_]+$(filter)$ : [ $(s).name ] ] ;
+ if $(m)
{
- 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 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) ] ;
}
-
- local new-name =
- $(noversion-file[1])$(noversion-file[2]) ;
- result += [ new file-target $(new-name) exact : [ $(s).type ] :
- $(project) : $(a) ] ;
}
return $(result) ;
}