From: sam@ravnborg.org
To: linux-kernel@vger.kernel.org
Cc: Aron Griffis <aron@hp.com>, Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 23/28] kbuild: Extend kbuild/defconfig tags support to exuberant ctags
Date: Sun, 24 Sep 2006 23:18:19 +0200 [thread overview]
Message-ID: <11591327063625-git-send-email-sam@ravnborg.org> (raw)
In-Reply-To: <1159132706126-git-send-email-sam@ravnborg.org>
From: Aron Griffis <aron@hp.com>
The following patch extends kbuild/defconfig tags support to exuberant
ctags. The previous support is only for emacs ctags/etags programs.
This patch also corrects the kconfig regex for the emacs invocation.
Previously it would miss some instances because it assumed /^config
instead of /^[ \t]*config
Signed-off-by: Aron Griffis <aron@hp.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
Makefile | 44 +++++++++++++++++++++++++++-----------------
1 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/Makefile b/Makefile
index cd50298..13bc589 100644
--- a/Makefile
+++ b/Makefile
@@ -1273,6 +1273,31 @@ define all-defconfigs
$(call find-sources,'defconfig')
endef
+define xtags
+ if $1 --version 2>&1 | grep -iq exuberant; then \
+ $(all-sources) | xargs $1 -a \
+ -I __initdata,__exitdata,__acquires,__releases \
+ -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
+ --extra=+f --c-kinds=+px; \
+ $(all-kconfigs) | xargs $1 -a \
+ --langdef=kconfig \
+ --language-force=kconfig \
+ --regex-kconfig='/^[[:blank:]]*config[[:blank:]]+([[:alnum:]_]+)/\1/'; \
+ $(all-defconfigs) | xargs $1 -a \
+ --langdef=dotconfig \
+ --language-force=dotconfig \
+ --regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/'; \
+ elif $1 --version 2>&1 | grep -iq emacs; then \
+ $(all-sources) | xargs $1 -a; \
+ $(all-kconfigs) | xargs $1 -a \
+ --regex='/^[ \t]*config[ \t]+\([a-zA-Z0-9_]+\)/\1/'; \
+ $(all-defconfigs) | xargs $1 -a \
+ --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \
+ else \
+ $(all-sources) | xargs $1 -a; \
+ fi
+endef
+
quiet_cmd_cscope-file = FILELST cscope.files
cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files
@@ -1286,31 +1311,16 @@ cscope: FORCE
quiet_cmd_TAGS = MAKE $@
define cmd_TAGS
rm -f $@; \
- ETAGSF=`etags --version | grep -i exuberant >/dev/null && \
- echo "-I __initdata,__exitdata,__acquires,__releases \
- -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
- --extra=+f --c-kinds=+px"`; \
- $(all-sources) | xargs etags $$ETAGSF -a; \
- if test "x$$ETAGSF" = x; then \
- $(all-kconfigs) | xargs etags -a \
- --regex='/^config[ \t]+\([a-zA-Z0-9_]+\)/\1/'; \
- $(all-defconfigs) | xargs etags -a \
- --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \
- fi
+ $(call xtags,etags)
endef
TAGS: FORCE
$(call cmd,TAGS)
-
quiet_cmd_tags = MAKE $@
define cmd_tags
rm -f $@; \
- CTAGSF=`ctags --version | grep -i exuberant >/dev/null && \
- echo "-I __initdata,__exitdata,__acquires,__releases \
- -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
- --extra=+f --c-kinds=+px"`; \
- $(all-sources) | xargs ctags $$CTAGSF -a
+ $(call xtags,ctags)
endef
tags: FORCE
--
1.4.1
next prev parent reply other threads:[~2006-09-24 21:19 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-24 21:17 [PATCH 1/28] kconfig: support DOS line endings sam
2006-09-24 21:17 ` [PATCH 2/28] kbuild: consistently decide when to rebuild a target sam
2006-09-24 21:17 ` [PATCH 3/28] kbuild: add unifdef sam
2006-09-24 21:18 ` [PATCH 4/28] kbuild: replace use of strlcpy with a dedicated implmentation in unifdef sam
2006-09-24 21:18 ` [PATCH 5/28] kbuild: use in-kernel unifdef sam
2006-09-24 21:18 ` [PATCH 6/28] remove RPM_BUILD_ROOT from asm-offsets.h sam
2006-09-24 21:18 ` [PATCH 7/28] kconfig: linguistic fixes for Documentation/kbuild/kconfig-language.txt sam
2006-09-24 21:18 ` [PATCH 8/28] kbuild: linguistic fixes for Documentation/kbuild/modules.txt sam
2006-09-24 21:18 ` [PATCH 9/28] kbuild: linguistic fixes for Documentation/kbuild/makefiles.txt sam
2006-09-24 21:18 ` [PATCH 10/28] kbuild: ignore references from ".pci_fixup" to ".init.text" sam
2006-09-24 21:18 ` [PATCH 11/28] kbuild: modpost on vmlinux regardless of CONFIG_MODULES sam
2006-09-24 21:18 ` [PATCH 12/28] kbuild: make V=2 tell why a target is rebuild sam
2006-09-24 21:18 ` [PATCH 13/28] kbuild: make -rR is now default sam
2006-09-24 21:18 ` [PATCH 14/28] kbuild: preperly align SYSMAP output sam
2006-09-24 21:18 ` [PATCH 15/28] kbuild: add missing return statement in modpost.c:secref_whitelist() sam
2006-09-24 21:18 ` [PATCH 16/28] kbuild: create output directory for hostprogs with O=.. build sam
2006-09-24 21:18 ` [PATCH 17/28] kbuild: remove debug left-over from Makefile.host sam
2006-09-24 21:18 ` [PATCH 18/28] kbuild: fail kernel compilation in case of unresolved module symbols sam
2006-09-24 21:18 ` [PATCH 19/28] kbuild: update help in top level Makefile sam
2006-09-24 21:18 ` [PATCH 20/28] Documentaion: update Documentation/Changes with minimum versions sam
2006-09-24 21:18 ` [PATCH 21/28] kbuild: clarify "make C=" build option sam
2006-09-24 21:18 ` [PATCH 22/28] kbuild: fix for some typos in Documentation/makefiles.txt sam
2006-09-24 21:18 ` sam [this message]
2006-09-24 21:18 ` [PATCH 24/28] kbuild: fixup Documentation/kbuild/modules.txt sam
2006-09-24 21:18 ` [PATCH 25/28] kbuild: correct and clarify versioning info in Makefile sam
2006-09-24 21:18 ` [PATCH 26/28] kbuild: fix "mkdir -p" usage in scripts/package/mkspec sam
2006-09-24 21:18 ` [PATCH 27/28] dontdiff: add utsrelease.h sam
2006-09-24 21:18 ` [PATCH 28/28] kbuild: add distclean info to 'make help' and more details for 'clean' sam
2006-09-24 22:20 ` [PATCH 18/28] kbuild: fail kernel compilation in case of unresolved module symbols Al Viro
2006-09-24 22:35 ` Sam Ravnborg
2006-09-24 22:36 ` Al Viro
2006-09-24 22:47 ` Sam Ravnborg
2006-09-24 22:48 ` Al Viro
2006-09-25 6:24 ` [PATCH 13/28] kbuild: make -rR is now default Jan Engelhardt
2006-09-25 18:02 ` 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=11591327063625-git-send-email-sam@ravnborg.org \
--to=sam@ravnborg.org \
--cc=aron@hp.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