Commit 14af2035 authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Clean up tags/TAGS targets

They were partially broken by the SUBDIRS changes and could need
some cleanup anyway.
parent f92d4962
...@@ -713,25 +713,38 @@ distclean: mrproper ...@@ -713,25 +713,38 @@ distclean: mrproper
# Generate tags for editors # Generate tags for editors
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
TAGS: FORCE define all-sources
{ find include/asm-${ARCH} -name SCCS -prune -o -name BitKeeper -prune \ ( find . \( -name SCCS -o -name BitKeeper -o -name include -o \
-o -name '*.h' -print ; \ -name arch \) -prune \
find include -name SCCS -prune -o -name BitKeeper -prune -o \ -o -name '*.[chS]' -print; \
-type d \( -name "asm-*" -o -name config \) -prune -o \ find arch/$(ARCH) \( -name SCCS -o -name BitKeeper \) -prune \
-name '*.h' -print ; \ -o -name '*.[chS]' -print; \
find $(SUBDIRS) init arch/${ARCH} \ find include \( -name SCCS -o -name BitKeeper -o -name config -o \
-name SCCS -prune -o -name BitKeeper -prune -o \ -name 'asm-*' \) -prune \
-name '*.[chS]' -print ; } | grep -v SCCS | etags - -o -name '*.[chS]' -print; \
find include/asm-$(ARCH) \( -name SCCS -o -name BitKeeper \) -prune \
-o -name '*.[chS]' -print; \
find include/asm-generic \( -name SCCS -o -name BitKeeper \) -prune \
-o -name '*.[chS]' -print )
endef
quiet_cmd_TAGS = MAKE $@
cmd_TAGS = $(all-sources) | etags -
# Exuberant ctags works better with -I # Exuberant ctags works better with -I
tags: FORCE
quiet_cmd_tags = MAKE $@
define cmd_tags
rm -f $@; \
CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \ CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
ctags $$CTAGSF `find include/asm-$(ARCH) -name SCCS -prune -o -name BitKeeper -prune -o -name '*.h' -print` && \ $(all-sources) | xargs ctags $$CTAGSF -a
find include -name SCCS -prune -o -name BitKeeper -prune -o \ endef
-type d \( -name "asm-*" -o -name config \) -prune -o \
-name '*.h' -print | xargs ctags $$CTAGSF -a && \ TAGS: FORCE
find $(SUBDIRS) init -name SCCS -prune -o -name BitKeeper -prune -o \ $(call cmd,TAGS)
-name '*.[ch]' -print | xargs ctags $$CTAGSF -a
tags: FORCE
$(call cmd,tags)
# Brief documentation of the typical targets used # Brief documentation of the typical targets used
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
......
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