Boost logo

Boost-Build :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-03-31 12:42:38

On 2002-03-31 at 12:03 PM, david.abrahams_at_[hidden] (David Abrahams) wrote:

>> To be specific, I need to call load to load the Jamfiles, but they
>need to be
>> in the module of the project-root...
>Do they? What are the negative implications of doing otherwise? One
>thing I see, which I rather like, is that even in large projects each
>subproject would have its own variable namespace.

Yes they do, at least I think so, so correct me if it's not this way... Given

module project-root {
# in project-root.jam...
MY_INCLUDES = /usr/local/include ;
module jamfile-module {
# in .../Jamfile
exe point : point.cpp : <sysinclude>$(MY_INCLUDES) ;

Has unexpected results, you'll get nothing for the MY_INCLUDES var in the
Jamfile. Unless there is a way to import all the project-root vars into the
jamfile-module, I don't see any other way than to put the jamfile in the
project-root module.

>> modules.load <project-root-module> : <Jamfile> : <some-jamfile-dir> :
>> <some-jamfile-dir>/<Jamfile> ;
>> So it will include the Jamfile inside the <project-root-module> but
>use the
>> <some-jamfile-dir>/<Jamfile> to decide wether it's been loaded already
>or not.
>> Maybe a name closer to C++ might help, how about "module-key"?
>Naw, tag is fine, but it has nothing to do with the module. It is a file
>identifier. Why don't you just derive that directly from the file (with
>perhaps a little path normalization/simplification?)

True, it's a file ident in this case, but it doesn't have to be that in other
cases. We could use the <some-jamfile-dir> as the ident, but that would change
the meaning of the "search" argument for everybody else. At that point having
a different "load" specifically for jamfiles is preferable. But then we have
two different places to maintain the load code :-(

Of course, if the import question is resolvable, this becomes a moot point :-)

>> :-) ... but you can't handle --help* with HD* ;-\
>Why not?
>You just need to write an action which dumps the help, right?

Because they are considered options by the Jam executable. Which means that
they are not passed along as targets. Or maybe you mean to check the args and
insert fake targets to do the help?

-- 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, david.abrahams at, gregod at, cpdaniel at, john at