Boost logo

Boost-Build :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-04 17:44:29


----- Original Message -----
From: "Rene Rivera" <grafik666_at_[hidden]>
To: <jamboost_at_[hidden]>
Sent: Thursday, January 03, 2002 9:59 PM
Subject: Re: [jamboost] Wrapping up new design

> On 2002-01-03 at 04:37 PM, david.abrahams_at_[hidden] (David Abrahams) wrote:
>
> >There are other reasons why it would be useful to be able to translate a
> >path from relative to absolute. Maybe you should just add that
capability.
>
> Cool, then. How about adding a builtin rule "ABSOLUTE <target> ;". It just
> turns on the absolute flag in the target, like NOTFILE and others do.

I can't imagine what the point of having an absolute flag on a target might
be.

> >I guess your idea of a BIND rule returning empty when the file isn't
found
> >in SEARCH or LOCATE would be best.
>
> Totally agree with your Yucks :-)
>
> So a "BIND <target> ;" builtin then it is.

Sounds good.

> Which means that then the following is possible:
>
> [ if PWD is /home/user/something ]

Hmm; we could dispense with ABSOLUTE altogether and just supply PWD. From
there, we can turn any relative path into an absolute one ourselves, by
prepending the value of PWD:

$(some-path:R=$(PWD))

We could even do this in build actions to induce absolute paths there.

> PROJECT_CONFIG ?= project-config.jam ;
> SEARCH on $(PROJECT_CONFIG) : . ;
> ABSOLUTE $(PROJECT_CONFIG) ;
> BIND $(PROJECT_CONFIG) ;
> if $(PROJECT_CONFIG)
> {
> ECHO $(PROJECT_CONFIG) ;
> }
>
> Prints "/home/user/something/project-config.jam", if it's found.

That's pretty complicated. What do you think of my suggestions?

 


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