Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-10-05 10:44:19


Johan Nilsson wrote:
> Vladimir Prus wrote:
>> On Wednesday 04 October 2006 23:14, Johan Nilsson wrote:
>
> [snip]
>
>>> Why not use MATCH on the output to remove whatever you want? Or am I
>>> missing something?
>> FWIW, I had no luck at all getting MATCH to work. I've tried:
>>
>> local x = [ SHELL "pkg-config --cflags libxml-2.0" ] ;
>> echo "X : $(x) : X" ;
>>
>> local xs = [ MATCH "(.*)\\n" : $(x) ] ;
>> echo "Xs : $(xs) : Xs" :
>>
>> and got:
>>
>> X : -I/usr/include/libxml2
>>> X
>> Xs : -I/usr/i : Xs
>>
>>
>> and then I've tried just one slash before 'n' and got the same.
>
> It looks like MATCH doesn't support multi-line mode. In the BJam docs it
> states that the MATCH regex should be an egrep pattern, and that doesn't
> include \n.

Well it does, or can be made to, in the always entertaining bjam way of
having flexible string values. This should work (famous last words):

local xs = [ MATCH "([^
]*)" : $(x) ] ;

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

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