[bbv2] creating a main rule and respecting explicit

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[bbv2] creating a main rule and respecting explicit

Renaud Lepère
I am trying to create a new top rule that work with the
explicit keyword. I tried the following code, but when
I call bjam i get "hello all". How can i do this ?

rule mytest ( name )
{
    echo $(name) all ;
}
mytest hello ;
explicit hello ;

Thanks,
Renaud

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [bbv2] creating a main rule and respecting explicit

Vladimir Prus
On Friday 03 February 2006 14:28, Renaud Lepere wrote:
> I am trying to create a new top rule that work with the
> explicit keyword. I tried the following code, but when
> I call bjam i get "hello all". How can i do this ?
>
> rule mytest ( name )
> {
>     echo $(name) all ;
> }

This defined a rule (that is, function), that prints "$(name) all".

> mytest hello ;

This calls the above rule, which prints "hello all".

What exactly are you trying to do? All main target rules work with "explicit"
out of box, and it's impossible to write main target rule what would ignore
"explicit".

Have you read extender manual already? It's
http://boost.org/boost-build2/doc/html/bbv2/extender.html and is the first
think you should do before adding custom main target rules.

- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [bbv2] creating a main rule and respecting explicit

David Abrahams
In reply to this post by Renaud Lepère
"Renaud Lepere" <[hidden email]> writes:

> I am trying to create a new top rule that work with the
> explicit keyword. I tried the following code, but when
> I call bjam i get "hello all". How can i do this ?
>
> rule mytest ( name )
> {
>     echo $(name) all ;
> }
> mytest hello ;
> explicit hello ;

I'm confused.  There's no "explicit" keyword in the Boost.Jam
language.

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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