Boost logo

Boost-Build :

Subject: Re: [Boost-build] [Build] problem including jamfiles
From: Lee Winter (lee.j.i.winter_at_[hidden])
Date: 2009-04-22 00:32:10


On Tue, Apr 21, 2009 at 9:58 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> AMDG
>
> Lee Winter wrote:
>>
>> Given a project tree like this:
>>
>> top/
>> jamfile.jam # contains "include top.jam ;"
>> top.jam
>> sub/
>> jamfile.jam # contains "include sub,jam ;"
>> sub,jam
>>
>> then in top/sub bjam complains there is no such file as top.jam.
>>
>> Clearly the ancestral jamfiles are being processed in the directory in
>> which bjam is launched rather than in their respective directories.
>>
>> 1. Is this intentional? If so, what is the rationale?
>>
>> 2. Is there a work-around such that the parental jamfile can include
>> another file from its location?
>>
>
> I really suggest using import, as it is much better behaved than include.
>

I don't doubt it. However, neither include nor import are documented
AFAICT. So lexical inclusion is preferred because it is hard to
misunderstand. And brute force inclusion allows the building up of a
syntactic construct from fragements that may cross file boundaries.
Import appears to require that the file boundaries also be syntactic
boundaries. Is that assumption invalid?

When import is documented I'll be happy to convert.

Lee Winter
NP Engineering
Nashua, New Hampshire


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