Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-10-31 05:44:05


Rene Rivera wrote:
> [2002-10-30] Vladimir Prus wrote:
>
>
>>>>Rene, did you look at 'path.root' rule? With it, you can write
>>>
>>this as:
>>
>>>> value = [ path.root $(value) $(self.location) ] ;
>>>
>>>
>>>I did... the difference is that the way I did it simplifies the
>>
>>path in
>>
>>>addition to rooting it. I thought about changing the path.root to
>>
>>do what I
>>
>>>did above but didn't know if that would break anything else.
>>
>>Well.. path.root calls path.join which should simplify too.
>>Do you have an example where path.root won't do the right thing?
>
>
> [ path.root sub1/sub2/.. . ]
>
> produces: sub1/sub2/..
>
> I would think it should procude: sub1
>
> The problem is that path.join only reduces if the path is given to it in
> parts.

Actually, "sub1/sub2/.." is not "normalized path", you'd have to
write

[ path.root [ path.make sub1/sub2/.. ] . ]

This does not work, either, due to a bug in 'make' that I've just fixed
locally and will commit shortly. I'll change constants handling to
use path.root after that.

- Volodya

 


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