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
# Generate tags for editors
# ---------------------------------------------------------------------------
TAGS: FORCE
{ find include/asm-${ARCH} -name SCCS -prune -o -name BitKeeper -prune \
-o -name '*.h' -print ; \
find include -name SCCS -prune -o -name BitKeeper -prune -o \
-type d \( -name "asm-*" -o -name config \) -prune -o \
-name '*.h' -print ; \
find $(SUBDIRS) init arch/${ARCH} \
-name SCCS -prune -o -name BitKeeper -prune -o \
-name '*.[chS]' -print ; } | grep -v SCCS | etags -
define all-sources
( find . \( -name SCCS -o -name BitKeeper -o -name include -o \
-name arch \) -prune \
-o -name '*.[chS]' -print; \
find arch/$(ARCH) \( -name SCCS -o -name BitKeeper \) -prune \
-o -name '*.[chS]' -print; \
find include \( -name SCCS -o -name BitKeeper -o -name config -o \
-name 'asm-*' \) -prune \
-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
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"`; \
ctags $$CTAGSF `find include/asm-$(ARCH) -name SCCS -prune -o -name BitKeeper -prune -o -name '*.h' -print` && \
find include -name SCCS -prune -o -name BitKeeper -prune -o \
-type d \( -name "asm-*" -o -name config \) -prune -o \
-name '*.h' -print | xargs ctags $$CTAGSF -a && \
find $(SUBDIRS) init -name SCCS -prune -o -name BitKeeper -prune -o \
-name '*.[ch]' -print | xargs ctags $$CTAGSF -a
$(all-sources) | xargs ctags $$CTAGSF -a
endef
TAGS: FORCE
$(call cmd,TAGS)
tags: FORCE
$(call cmd,tags)
# 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