From: David Abrahams (dave_at_[hidden])
Date: 2004-12-29 11:33:40
Vladimir Prus wrote:
> So, the net result of your conversation is that to eliminate Jamroot, it's
> needed to require every Jamfile to call some rule (maybe different for
> top-level and child project) right at the top?
No. I must've failed to be clear.
There are lots of options. For example:
#1: a Jamfile doesn't label a subproject unless it declares itself to be
a subproject with a rule invocation. Result: top-level jamfiles need no
#2: a Jamfile is assumed to label a subproject unless it declares itself
to be a top-level project with a rule invocation. Result: subproject
jamfiles need no such call.
#3: Just like #2 except that if the search upward from an unlabeled
Jamfile finds no parent Jamfile, the Jamfile is treated as a top-level
Jamfile. Warnings are optional and tunable.
I rather like #3 because it makes writing subprojects easy and it makes
the simplest "getting started" project easy. I have some concern about
what happens when unintentional hierarchies are created, but the cases
actually seem non-problematic when I think them through.
> The problem is that I still not sure what this requirements is less
> problematic than having two filenames. Moreover, requiring every Jamfile to
> call some rule might break existing projects. So I think we better retain the
> current scheme, at least for now. I'll try to update the tutorial to refer to
> Jamroot when needed, and we'll see how that looks.
> What do you think?
You might be right. If Scons does it and hasn't changed the practice
due to pressure from users, there may not be a need to do better. I
just have a strong feeling that in real projects there's enough
information to do this stuff with one filename and the
project/subproject declarations that are already there.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
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