|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-05-13 00:58:42
Ali Azarbayejani wrote:
> My point was you can't have
> simple projects with just the Jamfile. Compare to "make"...all the
> simple things for simple projects that you can do with "make"
> shouldn't be hard or more complicated to do in Jam/BBv2. One of these
> simple things is creating a single build description file to build a
> simple program.
Ok, I understand what you're after.
> > > At the logical BOOST_ROOT/project-root.jam.
> >
> > Yes, that's precisely what we're saying. Ali's usage model is not one
> > which needs or wants subprojects most of the time, and the arrangement
> > where each project can stand on its own is a very important model.
>
> Yes. Most software modules of mine stand on their own or can be part
> of a bigger tree (or many different trees). So each module must be a
> project in its own right and by the current implementation requires
> not only a Jamfile but also its own project-root.jam. This is
> annoying.
Got this too. Thanks for making this clear.
> > ** The "right" approach, IMO, is to allow project-root.jam to fulfill
> > the functions of a top-level Jamfile if no such Jamfile exists. I'm
> > not sure how much infrastructure is required to implement that; maybe
> > it already works (though I doubt it).
>
> Sorry, again, that I didn't express this very well, but I was trying
> to express exactly this last idea with the addition that, if this is
> the solution to my problem, we might want to change the name of
> "project-root.jam" to something else.
>
> (1) "project-root.jam" doesn't look as much like a "Makefile" as does
> "Jamfile". A user transitioning from "make" (i.e. virtually
> everyone), or even earlier versions of Jam, will assume that
> "Jamfile" is what they should be writing for their simple
> single-directory project, not "project-root.jam".
I don't see an obvious answer yet. The problem is that project-root.jam is
loaded before loading any Jamfiles, because Jamfiles might depend on
constants/rules defined in project-root. So we can't use some directive in
Jamfile to say "this is top-level Jamfile, don't bother to look for
project-root.jam". Using alternative name, say Jamfile.main, looks the only
option.
> (2) Currently there is a build-system file called "project-root.jam"
> (boost/tools/build/new/project-root.jam), which in fact is not a
> model of the "project-root.jam" that you put at the root of your
> project (cf. "new/boost-build.jam" is a model of a user's
> "boost-build.jam", "new/user-config.jam" is a model of a user's
> "user-config.jam", etc). Hopefully, a new directory organization
> and some re-naming will solve these particular confusions, but in
> general it seems to me that the "project-root.jam" file serves a
> purpose much more associated with "Jamfile" than with *.jam in the
> build system. Therefore it is confusing that it looks like a .jam
> file rather than looking like a build description file with a name
> like "Jamroot" or some such thing. The two files "project-root.jam"
> and "Jamfile" work together to provide the build description and they
> should look like they work together. (Perhaps "project-root.jam" and
> "subproject.jam"?...I don't care so much about the naming as the fact
> that it should be clear that these files work together and that it
> should be possible to create a stand-alone, single-directory
> project with single build description file that builds a simple
> program
> or library or whatever).
I buy this argument. Not partial about new name of project-root.jam, but
Jamfile is nice, so probably Jamroot is ok.
- 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