List Info

Thread: "actions together" not working?




"actions together" not working?
country flaguser name
United States
2007-04-05 23:51:51
How exactly can I use "actions together" to batch
compile files?

I have made a very simple tool definition to try out this
feature:

-------
import feature ;

feature.extend toolset : mytool ;

rule init ( version ? : command * : options * )
{
}

generators.register-c-compiler mytool.compile.c++ : CPP :
OBJ : 
    <toolset>mytool ;
generators.register-linker mytool.link : OBJ : EXE :
<toolset>mytool ;

rule compile.c++ ( targets + : sources * : properties * )
{
}

rule link ( targets + : sources * : properties * )
{
}

actions together compile.c++
{
    copy $(>) $(<)
}

actions link
{
    copy $(>[1]) $(<)
}
-------

If I invoked bjam on a Jamroot with the content:

exe foo : foo1.cpp foo2.cpp foo3.cpp ;

I would expect "actions compile.c++" to be invoked
with $(>) = foo1.cpp
foo2.cpp foo3.cpp. But it isn't! Instead, the action is
invoked three times,
once for each input file.

Is this broken? Or am I doing it wrong?


This feature is becoming more important to my project, as
the compiler I'm
using must check out a license each time it's invoked, and
the license check
takes forever over the network. I wanted to batch-build the
files so that I
can check the license out _once_ and compile all the files
together (at
least all the files with the same flags).


-dr

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

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )