From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2004-11-19 09:55:08
Vladimir Prus wrote:
> == Motivation ==
> Currently, the set of rules that can be used in Jamfile and project-root.jam
> are different. Targets can be defined in Jamfile, but not in project-root.jam.
> Constants can be defined in project-root.jam, but not in Jamfile. Top-level
> directory of a project typically contain both project-root.jam and Jamfile.
> It would be desirable to have only one kind of file, with single set of
> allowed rules.
I definitly agree !
> == Proposed user-visible changes ==
> It will be possible to use the same rules in project-root.jam and Jamfile. In
> particular, declaring targets in project-root.jam and using the 'constant'
> rule in every Jamfile.
> The rules and constants defined in any Jamfile will be available in every
> child Jamfile.
> If project-root.jam and Jamfile are in the same directory, both files will be
> in the same module scope.
> == Discussion ==
> The primary reason for project-root.jam is to decide if a project is top-level
> and should not inherit properties from any Jamfiles up in the directory
> tree. We need to use special filename -- it's not possible to use some "I'm
> top-level" call in Jamfile, because we need to load parent Jamfile before
> loading this Jamfile, to make constants visible.
> It's quite possible to use project-root.jam just as different name of
> Jamfile. When trying to load project, we look both for Jamfile and for
> project-root.jam. If we found Jamfile, we first lookup/load parent project and
> then load Jamfile. If we found project-root.jam, we just load it, without
> looking up the parent. The loading process for Jamfile and project-root.jam
> will be exactly the same, and the set of rule which can be used in Jamfile and
> project-root.jam will be the same.
> For backward compatibility, if a directory contains both project-root.jam and
> Jamfile, we'll load both.
May I propose soth different: I suggest to have a file 'Jamroot' (or
Jamrootfile or soth.) in the root-directory and 'Jamfile' everywher
else. Starting all bjam related files with the prefix 'Jam' might
confuse people less. And for backward compat. we could say: or you have
Jamrootfile or a project-root.jam and Jamfile.
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