Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-05-31 09:10:35


On Tuesday 31 May 2005 16:37, Larry Evans wrote:

> > should the phrase:
> >
> > you could add the following definition to the project-root.jam file:
> >
> > be:
> >
> > you could add the following definition to either the project-root.jam
> > or the jamroot file:

Essentially, you should forget about project-root.jam For top-level directory
you should use Jamroot, and for other directories -- Jamfile.

> > it must be put in project-root.jam. Is that right? So, if you have
> > an exiting jamroot, and want to create a main target rule for the
> > project or sub-project, you'd have to replace the jamroot file with
> > both a jamfile and a project-root.jam file. I that right?
>
> I tried both ways and neither works. With:
>
> project-root.jam=
>
> <------- cut here ----------
> import testing ;
> import type ;
> import generators ;
>
> type.register OUTPUT : output ;
>
> generators.register-standard save-output : EXE : OUTPUT ;
>
> rule main-rule ( target : source : properties * )
> {
> }
>
> actions main-rule
> {
> }
>
> >------- cut here ----------
>
> and Jamfile.v2=

> exe test_exe
>
> : test.cpp
>
> ;
>
> main-rule test_out

What made you think that main target rule is called "main-rule". Do the docs
say that?

At least at http://boost.org/boost-build2/doc/html/bbv2/extending/rules.html
it's said that declaration of type OUTPUT will create main target rule called
"output". "main-rule" is a name of action, and is not related to the name of
main target rule.

HTH,
Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
 

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