Boost logo

Boost-Build :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-05-31 10:26:16


Hi, Vladimir.

Thanks for the reply.

On 05/31/2005 09:10 AM, Vladimir Prus wrote:
[snip]
> Essentially, you should forget about project-root.jam For top-level directory
> you should use Jamroot, and for other directories -- Jamfile.
>
OK. Thanks.
>
[snip]
>>
>>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?
No. I thought the contents of the above listed project-root.jam would
make it a "main-rule". I only used the name, "main-rule" to emphasize
my intentions. I'd previously called it save-output. Now that I
look again, I see I should have changed the register statement to:

generators.register-standard main-rule : EXE : OUTPUT ;

in order to associate the target type with the rule. Tried that, but it
didn't work.

>
> 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

OK. I thought the generators.register statement would register the
rule. OK, looking closer, I see the html has obfuscate.file instead of
obfuscated_cpp. And, of course, as you say, the previous sentence says
the rule name is obtained from 1st argument to type.register.

So, tried new Jamfile.v2:

<Jamfile.v2>
import type ;

type.register OUTPUT : output ;

rule output ( target : exe )
{
}

actions output
{
}

project
: requirements
: default-build debug
;

exe test_exe
: test.cpp
;

output test_out
: test_exe
;

</Jamfile.v2>

but still got:

<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
output test_out
...updated 1 target...

</bjam --v2 test_out>

Any ideas?

TIA.

 


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