Commit a275f1c8 authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Add cscope support to Makefile

We support tags and TAGS already, so...

by Louis Zhuang
parent d2fdc759
...@@ -190,7 +190,7 @@ depfile = $(subst $(comma),_,$(@D)/.$(@F).d) ...@@ -190,7 +190,7 @@ depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
noconfig_targets := xconfig menuconfig config oldconfig randconfig \ noconfig_targets := xconfig menuconfig config oldconfig randconfig \
defconfig allyesconfig allnoconfig allmodconfig \ defconfig allyesconfig allnoconfig allmodconfig \
clean mrproper distclean \ clean mrproper distclean \
help tags TAGS sgmldocs psdocs pdfdocs htmldocs \ help tags TAGS cscope sgmldocs psdocs pdfdocs htmldocs \
checkconfig checkhelp checkincludes checkconfig checkhelp checkincludes
RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \) -prune -o RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \) -prune -o
...@@ -693,7 +693,7 @@ MRPROPER_FILES += \ ...@@ -693,7 +693,7 @@ MRPROPER_FILES += \
.menuconfig.log \ .menuconfig.log \
include/asm \ include/asm \
.hdepend include/linux/modversions.h \ .hdepend include/linux/modversions.h \
tags TAGS kernel.spec \ tags TAGS cscope kernel.spec \
.tmp* .tmp*
# Directories removed with 'make mrproper' # Directories removed with 'make mrproper'
...@@ -751,6 +751,9 @@ define all-sources ...@@ -751,6 +751,9 @@ define all-sources
-name '*.[chS]' -print ) -name '*.[chS]' -print )
endef endef
quiet_cmd_cscope = MAKE $@
cmd_cscope = $(all-sources) | cscope -k -b -i -
quiet_cmd_TAGS = MAKE $@ quiet_cmd_TAGS = MAKE $@
cmd_TAGS = $(all-sources) | etags - cmd_TAGS = $(all-sources) | etags -
...@@ -763,6 +766,9 @@ define cmd_tags ...@@ -763,6 +766,9 @@ define cmd_tags
$(all-sources) | xargs ctags $$CTAGSF -a $(all-sources) | xargs ctags $$CTAGSF -a
endef endef
cscope: FORCE
$(call cmd,cscope)
TAGS: FORCE TAGS: FORCE
$(call cmd,TAGS) $(call cmd,TAGS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment