Boost logo

Boost-Build :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-05-31 07:37:21


On 05/31/2005 06:51 AM, Larry Evans wrote:
> On 05/30/2005 09:30 PM, David Abrahams wrote:
[snip]
>>No. Jamroot serves as a combined project-root.jam and Jamfile.
>>
>
> Then, in:
>
> v2/doc/html/bbv2/extending/rules.html
>
> 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:
>
> ? Or maybe puting a rule in jamroot will not make it a "main target
> rule"; hence, as stated in:
>
> v2/doc/html/bbv2/extending/rules.html
>
> 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=

<------- cut here ----------
project
: requirements
: default-build debug
;

exe test_exe
: test.cpp
;

main-rule test_out
: test_exe
;
>------- cut here ----------

I get:

<------- cut here ----------
cd /home/evansl/prog_dev/boost-cvs/boost/sand-box/lje/bjam/
bjam --v2 test_out
notice: could not find main target test_out
notice: assuming it's a name of file to create
...found 1 target...
...updating 1 target...
warning: using independent target test_exe
main-rule test_out
...updated 1 target...
>------- cut here ----------

AFAICT, this directly reflects what:

v2/doc/html/bbv2/extending/rules.html

says should be done in the last option (putting rule in project-root.jam
), except an actions matching the rule was also added.

What am I doing wrong?

 


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