Boost logo

Boost-Build :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-01-04 18:44:07


On 2002-01-04 at 06:35 PM, david.abrahams_at_[hidden] (David Abrahams) wrote:

>
>----- Original Message -----
>From: "Rene Rivera" <grafik666_at_[hidden]>
>even using $(PWD) doesn't simplify it much. It just eliminates the
>> ABSOLUTE call. The loop for finding the top project file is a little
>easier to
>> look at:
>>
>> local d_ = $(PWD) ;
>> while ($(d_) != $(d_:P))
>> {
>> SEARCH on $(PROJECT_CONFIG) : $(d_) ;
>> BIND $(PROJECT_CONFIG) ;
>> if $(PROJECT_CONFIG)
>> {
>> include $(PROJECT_CONFIG) ;
>> }
>> d_ = $(d_:P) ;
>> }
>
>local d = .
>for local x in [ splitpath $(PWD) ]
>{
> SEARCH on $(PROJECT_CONFIG) += $(d) ;
> d = $(d)/.. ;
>}
>include $(PROJET_CONFIG) ;

Nice, but unfortunately I given that this is code in Jambase I can only use
builtins. Also "." and "/.." ar not platform independent, and the $(DOT) and
$(DOTDOT) var aren't defined at this point. Although here is a slightly better
one than mine, removing the "if" as you did:

local d_ = $(PWD) ;
while ($(d_) != $(d_:P))
{
PROJECT_CONFIG_PATH += $(d_) ;
d_ = $(d_:P) ;
}
SEARCH on $(PROJECT_CONFIG) : $(PROJECT_CONFIG_PATH) ;
include $(PROJECT_CONFIG) ;

Not so different from yours :-)

-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq - Grafik666_at_AIM - Grafik_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