mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masatake YAMATO <yamato@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] kbuild: escape meta characters in regular expression in make TAGS
Date: Wed, 07 May 2008 16:04:31 +0900 (JST)	[thread overview]
Message-ID: <20080507.160431.251452611.yamato@redhat.com> (raw)

Hi,


Alexey Dobriyan <adobriyan@gmail.com> introduced a code adds
menuconfig SOMETHING in Kconfig to tags output when you did "make tags".

See http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=80ff26241623875636674a31c0540a78c0fb5433

"make tags" may work fine with his code. However make TAGS doesn't work well
because etags command requires backslashes to escape meta characters like 
`(', `)' and `|'.

Here is a patch.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>

	
diff --git a/Makefile b/Makefile
index 4492984..d4aa437 100644
--- a/Makefile
+++ b/Makefile
@@ -1431,7 +1431,7 @@ define xtags
 	elif $1 --version 2>&1 | grep -iq emacs; then \
 	    $(all-sources) | xargs $1 -a; \
 	    $(all-kconfigs) | xargs $1 -a \
-		--regex='/^[ \t]*(menu|)config[ \t]+\([a-zA-Z0-9_]+\)/\2/'; \
+		--regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'; \
 	    $(all-defconfigs) | xargs -r $1 -a \
 		--regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \
 	else \

             reply	other threads:[~2008-05-07  7:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07  7:04 Masatake YAMATO [this message]
2008-05-11  8:13 ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080507.160431.251452611.yamato@redhat.com \
    --to=yamato@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®