Re: [RFC PATCH] Add a 'minimal tree install' target

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Sam Ravnborg <sam@...>
Cc: Chris Wedgwood <cw@...>, LKML <linux-kernel@...>, <davej@...>, Eric Sandeen <sandeen@...>
Date: Thursday, September 13, 2007 - 4:17 pm

Hallo.

On Thu, Sep 13, 2007 at 09:19:38PM +0200, Sam Ravnborg wrote:
[]

That particular one-line `ALTARCH := i386' of course can be matched
simpler, because there's only *one* (as written above) whitespace and no
make's assignment variations, like (?=,=). I wonder, if there can be more
options, than i386 and more occurrences of `ALTARCH' actually :) Also,
make can have lead whitespace on line start, as well as near assignment
sign, if that matters.

So, to match *one* line with *one* `ALTARCH' followed by `i386'

sed -n '/ALTARCH/{/i386/{p ; q}}' 

is fine by me. If there are dis-assignments, so to speak, or comments
with i386 this will not work obviously. But it's fast and must work
with variety of make syntax. Check is "for non empty output".

Also, please take a look on man isspace(). It matches much more
characters, than necessary for ordinary syntax whitespace. Using
[:blank:] (i.e. tab and space, with no options) is OK. Last thing: i'm not
sure, what that `+' is. I stick to BRE in sed, as it should be, so just
don't know what it does.

Hope that helps.
____
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH] Add a 'minimal tree install' target, Chris Wedgwood, (Wed Sep 12, 7:25 pm)
Re: [RFC PATCH] Add a 'minimal tree install' target, Goswin von Brederlow, (Fri Sep 14, 12:44 pm)
Re: [RFC PATCH] Add a 'minimal tree install' target, Sam Ravnborg, (Thu Sep 13, 2:34 pm)
Re: [RFC PATCH] Add a 'minimal tree install' target, Chris Wedgwood, (Thu Sep 13, 2:57 pm)
Re: [RFC PATCH] Add a 'minimal tree install' target, Dave Jones, (Thu Sep 13, 7:27 pm)
Re: [RFC PATCH] Add a 'minimal tree install' target, Sam Ravnborg, (Thu Sep 13, 3:19 pm)
Re: [RFC PATCH] Add a 'minimal tree install' target, Oleg Verych, (Thu Sep 13, 4:17 pm)
Re: [RFC PATCH] Add a 'minimal tree install' target, Chris Wedgwood, (Thu Sep 13, 4:05 pm)
Re: [RFC PATCH] Add a 'minimal tree install' target, Oleg Verych, (Fri Sep 14, 6:04 am)
Re: [RFC PATCH] Add a 'minimal tree install' target, Robert P. J. Day, (Thu Sep 13, 2:37 pm)
Re: [RFC PATCH] Add a 'minimal tree install' target, Sam Ravnborg, (Thu Sep 13, 3:26 pm)
Re: [RFC PATCH] Add a 'minimal tree install' target, Tilman Schmidt, (Fri Sep 14, 5:59 am)