Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-12-29 08:51:56


On Tuesday 28 December 2004 23:05, David Abrahams wrote:

> >> There's no precedent for that in any build system
> >> I've seen,
> >
> > SCons?
>
> SCons requires a file at the root of a project that isn't called
> Sconsfile? That's news to me.

The top-level file is called SConstruct, and it invokes subsidiary files
called SConstript. Probably, it's just a convention and subsidiary files can
have any name...

> >> and it's been a continual sort of mental friction from users.
> >> I remember that Ali had real problems with it,
> >
> > IIRC, his primary problem was that even "hello" example needs *two* files
> > -- Jamfile and project-root.jam -- and that's no longer required.
>
> Yes, but it's weird that the "default" name for a project file is
> "Jamfile" yet the simplest project requires "Jamroot." All of this can
> be handled with different Jamfile contents rather than introducing an
> additional file. The latter is more heavyweight.
.....
> >> As an alternative subprojects could just declare:
> >>
> >> subproject ;
> >>
> >> or
> >>
> >> subproject . ;
> >>
> >> Or, we could simply require that top-level uses of the project rule all
> >> have ids. Any unnamed project will trigger a search up for a parent
> >> Jamfile.
> >
> > So, a project is still is required to invoke the "project" rule, right?
>
> There are many ways to eliminate Jamroot. If you take my last
> suggestion, yes, the project root at least would have to invoke the
> project rule to avoid the warning and upward search... though the
> warning might be unobtrusive or even turned off by default.
>
> Alternatively, you could introduce a "subproject" rule and require
> subprojects to invoke it.

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?

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?

- Volodya

 


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