Gmane
From: Vladimir Prus <ghost <at> cs.msu.su>
Subject: Re: bbv2/extender.html#bbv2.extending.rules glib (slightly modified) example fails.
Newsgroups: gmane.comp.lib.boost.build
Date: 2007-09-05 19:19:57 GMT (1 year, 43 weeks, 1 day, 6 hours and 16 minutes ago)
Larry Evans wrote:

> Following the instructions similar to those for the glib example, my
> project-root.jam contains:

Remind me, what is 'glib example'?

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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build