tree 5e888e7ffbd70a82c9345ea51d83cb163db27d5d
parent 49490571bcfe24d279a66ba24198e8ba299fe58f
author Sam Ravnborg <[EMAIL PROTECTED](none)> Thu, 28 Jul 2005 23:11:34 +0200
committer Sam Ravnborg <[EMAIL PROTECTED](none)> Thu, 28 Jul 2005 23:11:34 +0200

kbuild: fix make TAGS (for emacs use)

From: [EMAIL PROTECTED] <Jeremy Bongio>
make TAGS does not make source code tags for emacs. It instead
returns an error than "etags -" isn't valid. The problem is
easily remedied.

Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>

 Makefile |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1203,9 +1203,15 @@ cscope: FORCE
        $(call cmd,cscope)
 
 quiet_cmd_TAGS = MAKE   $@
-cmd_TAGS = $(all-sources) | etags -
+define cmd_TAGS
+       rm -f $@; \
+       ETAGSF=`etags --version | grep -i exuberant >/dev/null && echo "-I 
__initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \
+       $(all-sources) | xargs etags $$ETAGSF -a
+endef
+
+TAGS: FORCE
+       $(call cmd,TAGS)
 
-#      Exuberant ctags works better with -I
 
 quiet_cmd_tags = MAKE   $@
 define cmd_tags
@@ -1214,9 +1220,6 @@ define cmd_tags
        $(all-sources) | xargs ctags $$CTAGSF -a
 endef
 
-TAGS: FORCE
-       $(call cmd,TAGS)
-
 tags: FORCE
        $(call cmd,tags)
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to