|
Boost-Build : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-04 19:43:29
----- Original Message -----
From: "Rene Rivera" <grafik666_at_[hidden]>
> >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.
Actually, right now you can compile Boost.Jam with a stock Perforce Jam. If
you use extension syntax like "while", you'll break that. The most
principled solution would be:
rule search-to-root # target : dir
{
local prev = $(3) ;
prev ?= . ;
SEARCH on $(<) += $(prev) ;
if $(>:P) != $(>)
{
search-to-root $(<) : $(>:P) : $(prev)/.. ;
}
}
...
search-to-root $(PROJECT_CONFIG) : $(PWD) ;
> Also "." and "/.." ar not platform independent, and the $(DOT) and
> $(DOTDOT) var aren't defined at this point.
It is my intention to make ".", ".." and "/" work on all platforms we
support, so people won't ever need to write $(DOT)$(SLASH)$(DOTDOT). That is
already the case currently, so it's not too much work ;-)
-Dave
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