Boost logo

Boost-Build :

From: Dave Rahardja (drahardja_at_[hidden])
Date: 2007-04-18 10:12:39


OK I got it.

rule make-absolute (paths * : root )
{
    local out = ;
    for p in $(paths)
    {
        local g = [ path.root [ path.make $(p) $(root) ] ] ;
        g = [ regex.replace $(g) "\\\\" / ] ;
        g = [ regex.split $(g) / ] ;
        g = [ path.join $(g) ] ;
        g = [ path.native $(g) ] ;
        out += $(out) ;
    }
    return $(out);
}

Whew!

> -----Original Message-----
> From: boost-build-bounces_at_[hidden]
> [mailto:boost-build-bounces_at_[hidden]] On Behalf Of Rene Rivera
> Sent: Monday, April 16, 2007 10:12 AM
> To: Boost.Build developer's and user's list
> Subject: Re: [Boost-build] How to get absolute paths?
>
> Dave Rahardja wrote:
>
> > I've gotten a little further by using:
> >
> > rule make-absolute ( paths * : root )
> > {
> > local out = ;
> > for p in $(paths)
> > {
> > out += [ path.root $(p) $(root) ] ;
> > }
> > return $(out) ;
> > }
> >
> > local includes = [ on $(target) return $(INCLUDES) ] ;
> > includes = [ make-absolute $(includes) : [ path.native [
> path.pwd ] ] ] ;
>
> Try changing that to:
>
> includes = [ path.native [ make-absolute $(includes) : [
> path.pwd ] ] ] ;
>
> If that doesn't work, there's a rule in path.jam that minimizes paths.
>
> --
> -- Grafik - Don't Assume Anything
> -- Redshift Software, Inc. - http://redshift-software.com
> -- rrivera/acm.org - grafik/redshift-software.com
> -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost-build
>


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