Boost logo

Boost-Build :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-09-27 08:54:32


On 09/26/07 11:22, Larry Evans wrote:
> On 09/26/07 10:36, Rene Rivera wrote:
[snip]
> Thanks *very much* for the clarification. I read about
> the difference between Boost.Build and Boost.Jam, but
> didn't really understand all that much. The keyword
> you used was *interface*. Somehow, it's got to be
> made clear to the user where that interface lies.
> For example, if the actions in the:
>
> actions inline-file
>
> of:
>
> http://www.boost.org/boost-build2/doc/html/bbv2/extending/tools.html
>
> contained:
>
> my-update x : y ;
>
> and the Jamfile was:
>
> import verbatim.jam ;
> verbatim a : b.cpp ;
>
> would command line:
>
> bjam a
>
> cause invocation of the my-update rule then the my-update actions?

Apparently not because the attached Jamfile and the command line:

   bjam a

gives output:

rule gexe a
rule my-update a : a.cpp
...
...found 15 targets...
...updating 2 targets...
gcc.compile.c++
../../../bin.v2/tools.0/experiments/jam-build-interface/gcc-4.1/debug/a.o
gcc.link
../../../bin.v2/tools.0/experiments/jam-build-interface/gcc-4.1/debug/a
...updated 2 targets...

So when is the documentation about the BJam automatic connection between
rule and actions with the same name, as described here:

http://www.boost.org/doc/html/jam/language.html#jam.language.rules

and here (search for 'create-file-from-another'):

http://www.boost.org/doc/html/bbv2/advanced.html#bbv2.advanced.jam_language

ever useful to the end user? An example would be handy.

project jam-build-interface
  ;

rule my-update
{
    ECHO "rule my-update" $(<) ":" $(>) ;
}
actions my-update
{
    echo "actions my-update" $(<) ":" $(>) ;
}

rule gexe ( name )
{
    echo "rule gexe" $(name) ;
    my-update $(name) : $(name).cpp ;
    exe $(name) : $(name).cpp ;
}

gexe a
  ;


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