Boost logo

Boost-Build :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-09-05 15:34:00


On 09/05/07 14:19, Vladimir Prus wrote:
> Larry Evans wrote:
>
>> Following the instructions similar to those for the glib example, my
>> project-root.jam contains:
>
> Remind me, what is 'glib example'?

Sorry. It's here:

http://www.boost.org/doc/html/bbv2/extender.html#bbv2.extending.rules

>
>> rule glib ( name )
>> {
>> obj $(name)_obj : $(name).cpp ;
>> }
>
>> glib test
>> ;
>>
>> However, I got:
>>
>> bjam --v2 test
>> gcc.jam:init-link-flags:toolset,condition= gcc , <toolset>gcc-4.1
>> gcc.jam:init-link-flags:toolset,condition= gcc , <toolset>gcc-4.3_v
>> notice: could not find main target test
>> notice: assuming it's a name of file to create
>
> You have defined rule (which is basically a function in jam-speak)
> that calls the 'obj' rule. The obj rule is called with 'test_obj' as
> the name, and create main target called 'test_obj'. There's no target
> called 'test' declared.
>
> Just calling a function does not automatically creates a main target.
> There are just two ways to create a main target:
>
> - Call the targets.main-target-alternative
> - Call some existing rule that creates main target. That will
> will eventually call targets.main-target-alternative
>
> HTH,

Yes, thanks. I'd assumed from just the glib example that

glib xxx ;

in the Jamfile.v2 would create xxx target. Don't you read the example
that way?


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