|
Boost-Build : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2007-08-08 18:51:10
Damn if I didn't find it in testing jam
# Given a project location, compute the name of Boost library
local rule get-library-name ( path )
{
# Path is in normalized form, so all slashes are forward.
local match1 = [ MATCH /libs/(.*)/(test|example) : $(path) ] ;
local match2 = [ MATCH /libs/(.*)$ : $(path) ] ;
local match3 = [ MATCH (/status$) : $(path) ] ;
if $(match1) { return $(match1[0]) ; }
else if $(match2) { return $(match2[0]) ; }
else if $(match3) { return "" ; }
else if --dump-tests in [ modules.peek : ARGV ]
{
# The 'run' rule and others might be used outside
# boost. In that case, just return the path,
# since the 'library name' makes no sense.
return $(path) ;
}
}
note test | example
Of course this raises the question of the best way to fix it.
Is there a way to change things so that there is no hidden
dependence between Jamfiles and directory names?
Robert Ramey
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk