From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2006-10-05 03:25:54
Rene Rivera wrote:
> Johan Nilsson wrote:
>> "Rene Rivera" <grafikrobot_at_[hidden]> skrev i meddelandet
>>> Johan Nilsson wrote:
>>>> "Rene Rivera" <grafikrobot_at_[hidden]> skrev i meddelandet
>>>>> SHELL/COMMAND to act as the CLI shell do. Perhaps an
>>>>> LIBXML_INCLUDES = [ SHELL "pkg-config --cflags libxml-2.0" :
>>>>> eol-delimited-output ] ;
>>>>> One might want to implement a 'ws-delimited-output' at the same
>>>>> time :-)
>>>> Why not use MATCH on the output to remove whatever you want? Or am
>>>> I missing
>>> Not missing anything :-) One advantage to doing this at the SHELL
>>> level is that it will use less memory, because it can parse the
>>> output as it comes in and hence saves of having the possibly big
>>> output string around.
>> Ok, how about simply allowing a regex expression as the delimiter
> Sure. I suppose you have some use cases?
No, what I am suggesting is generally known as premature generalization ;-)
(In other words, thinking out loudly)
> And hence why you are
> suggesting it. Personally I have a need for smarter parsing of SHELL
> output than just regex delimited.
Callbacks into user-defined rules for each (regex-specified) delimited item
(don't know enough about Jam to figure out if it's possible)?
rule shell-cb ( item )
if $(item) in $(interesting-items)
echo FOUND: $(item) ;
return $(item) ;
echo IGNORED: $(item) ;
return "" ;
local separator-regex = [\r\n]+ ;
local interesting-output = [ SHELL "foo.exe" : $(separator-regex) :
$(__name__).shell-cb ] ;
As I said previously, just thinking out loud. IIRC there was also an issue
with stderr not being captured?
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