Boost logo

Boost-Build :

Subject: Re: [Boost-build] Issue in glob rule when invoked in <conditional>.
From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2012-07-25 01:28:47


   Hi.

>> Well, we can also say - the project-rules.glob() rule can not be
>> called once the Jamfile loading phase has finished its work, but that
>> does not feel right either...
>
> On the other hand, this approach is something we can easily enforce -
> and it has some logic -- the 'glob' rule is used in project context, and
> as soon as project loading is done, there's no project context.

   True. I'm kind of leaning towards this solution myself as well as it
seems the cleanest, with no rough edges to deal with.

   We could actually clear the .current-project variable when loading is
done and have the project.current-project() rule error out if there is
no 'current project' context. This might also flush out some other
use-cases where we were depending on 'undefined behaviour'...

   If the user wants to 'glob' a folder at a later stage, he can always
use the built-in GLOB rule or any of its wrapper rules from the path module.

   Best regards,
     Jurko Gospodnetić


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