From bb0216db8e023ad51b7a1942a5a9b21ba89f28c9 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Wed, 7 Mar 2012 15:08:59 +0100 Subject: tools/sed-*: first eat all comments --- tools/sed-variables | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/sed-variables') diff --git a/tools/sed-variables b/tools/sed-variables index 36c612f..e5fbd12 100644 --- a/tools/sed-variables +++ b/tools/sed-variables @@ -1,2 +1,9 @@ +# eat all comments +/^\s*\/\*/ { + :comment + /\*\/\s*$/ { n; b nocomment } + n; b comment +} +:nocomment # variable should be EAPI extern word word;; s/^\s*(EAPI\s+extern\s+\w+\s+\*?\w+\s*;).*$/\1/p -- cgit v1.2.3