Boost logo

Boost-Build :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-05-03 08:59:32


Suggestion:

# path.join will join and simplify any number of path elements.
# generates an error if any element other than the first one is rooted.
rule join ( elements + )
{
...
}

# path.root returns rooted paths unmodified, but prepends
# new-root to unrooted paths
rule root ( new-root : path )
{
if [ rooted $(path) ]
{
return $(path) ;
}
else
{
return [ join $(new-root) $(path) ] ;
}
}

+---------------------------------------------------------------+
David Abrahams
C++ Booster (http://www.boost.org) O__ ==
Pythonista (http://www.python.org) c/ /'_ ==
resume: http://users.rcn.com/abrahams/resume.html (*) \(*) ==
email: david.abrahams_at_[hidden]
+---------------------------------------------------------------+

 


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