From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-10-15 08:34:30
Austin Bingham wrote:
> > The problem is that "use-project" is allowed in Jamfile, too, and I think
> > it's a good idea. It's still possible to make "use-project" work, anyway.
> > I was wondering about use-cases for "use-project" where used project does
> > not have a separate project-root.jam. In my settings, I use "use-project"
> > for dependedies on boost, and some local, relatively standalone
> > libraries, which all have their own project-root.jam. So I wonder if
> > other case is reasonable/ needed.
> I used use-project fairly extensively to point to targets with the same
> project-root to give flexibility when I was organizing my source files. It
> gave me the freedom to move things around freely while minimizing the
> ripple of changes. So, I guess that's one use case. It could also be
> argued that, in the case of particularly deep project hierarchies,
> use-project provides the best way to give make building those targets easy
> (i.e. by giving them easy names).
Ok, you've convinced me.
> > Of course, it is possible to delay processing of "use-project" directives
> > until
> Yes, that was sort of what I had in mind. Whatever module does the Jamfile
> loading could always remember what it has already loaded...if a
> use-project directive asks for it to be loaded again, it could just be
> ignored. I worry that I'm missing some subtlety about Jamfile load order,
Actually, the problem was fairly technical. The project.load rule first marks
the module as loaded, and then calls other rule. That rule loads parent
Jamfile, which contains "use-project" and tries to load the first Jamfile.
The problem is: it's marked as loaded, so it's not loaded again. But it was
never read, so project id for that module is not available, and use-project
I guess I'll fix this by marking Jamfile as loaded somewhat deeper in the
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