|
Boost-Build : |
From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2007-06-07 14:52:59
Hi,
I've got a rule like this :
rule dart-run ( target sources * : status : user : system : command :
output + )
{
ECHO "output = $(output)" ;
}
and I want to know how to setup the frame arguments so the output
(7th argument) evaluates to empty, and the output echo is
suppressed. Here's the code (in make1.c) where I setup to evaluate
the rule.
LIST* initial_args = list_copy( L0, dart_rule->next );
FRAME frame[1];
frame_init( frame );
lol_add( frame->args, list_new( initial_args, target->name ) );
append_int_string(frame->args, status);
append_double_string(frame->args, time->user);
append_double_string(frame->args, time->system);
lol_add(frame->args, list_new(L0, newstr(executed_command)));
if (!command_output)
lol_add(frame->args, list_new(L0, ""));
else
lol_add(frame->args, list_new(L0, newstr(command_output)));
if( lol_get( frame->args, 2 ) )
evaluate_rule( dart_rule->string, frame );
As you can see, when the 7th argument is null, I create an "" string,
which doesn't evaluate to the empty string in the dart-run rule. Any
ideas on how to setup the frame argument so that when command_output
is null, the rule is correctly called?
Thanks.
-- Noel
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