Boost logo

Boost-Build :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-06-19 14:36:56


First off.. Thanks for working on this!

Craig Rodrigues wrote:
> On Tue, Jun 14, 2005 at 07:25:51PM +0400, Vladimir Prus wrote:
>
>>I'm not sure making a separate list element for each chunk that fread returns
>>is good. I'd use facilities from jam_src/string.h to build a big string and
>>create 1-element list.
>
> OK, thanks for the feedback. I am new to Jam internals, so I didn't
> know how to do that. I have incorporated your suggestions
> in another patch.
[...]
> + {
> + char * args[] = { "shellcmd", "*", 0 };

If the builtin is:

rule SHELL ( shellcmd * )

[...]
> + LIST* arg = lol_get( frame->args, 0 );
> + LIST* result = 0;
> + string s[1];
> + char buffer[1024];
> + int ret;
> + FILE *p = popen(arg->string, "r");

It should:

1. Check that an arg was actually passed in.
2. Handle if more than _one_ arg is passed in.

Or perhaps you meant the command to be: rule SHELL ( shellcmd ) ?

Also the builtin doesn't compile when "popen" is not available in the
runtime library, for example in the case of the MSL. And to add more
work for you, documentation for the new builtin should be added to
boost-root/tools/build/jam_src/index.html.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
 

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