Commit c75f4aa4 authored by Paolo \'Blaisorblade\' Giarrusso's avatar Paolo \'Blaisorblade\' Giarrusso Committed by Sam Ravnborg

[PATCH] kbuild: no redundant srctree in tags file

Avoid cluttering the tags/TAGS generated file with $(srctree) in the paths
if this is not needed.

This has two advantages:

- Saving about 20M on the size of the resulting tags file (which are used
  currently to store the absolute path of the file names rather than the
  relative one) when KBUILD_OUTPUT is not set.

- Keeping the tags file valid when the directory is renamed.

No change is done for who does make tags O=..., if this is wanted (I would
find that incommodous and non-typical for a developer, but anyway I've not
ruined functionality in that case).
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 3f4f4ded
......@@ -1145,20 +1145,30 @@ endif # KBUILD_EXTMOD
# Generate tags for editors
# ---------------------------------------------------------------------------
#We want __srctree to totally vanish out when KBUILD_OUTPUT is not set
#(which is the most common case IMHO) to avoid unneeded clutter in the big tags file.
#Adding $(srctree) adds about 20M on i386 to the size of the output file!
ifeq ($(KBUILD_OUTPUT),)
__srctree =
else
__srctree = $(srctree)/
endif
define all-sources
( find $(srctree) $(RCS_FIND_IGNORE) \
( find $(__srctree) $(RCS_FIND_IGNORE) \
\( -name include -o -name arch \) -prune -o \
-name '*.[chS]' -print; \
find $(srctree)/arch/$(ARCH) $(RCS_FIND_IGNORE) \
find $(__srctree)arch/$(ARCH) $(RCS_FIND_IGNORE) \
-name '*.[chS]' -print; \
find $(srctree)/security/selinux/include $(RCS_FIND_IGNORE) \
find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
-name '*.[chS]' -print; \
find $(srctree)/include $(RCS_FIND_IGNORE) \
find $(__srctree)include $(RCS_FIND_IGNORE) \
\( -name config -o -name 'asm-*' \) -prune \
-o -name '*.[chS]' -print; \
find $(srctree)/include/asm-$(ARCH) $(RCS_FIND_IGNORE) \
find $(__srctree)include/asm-$(ARCH) $(RCS_FIND_IGNORE) \
-name '*.[chS]' -print; \
find $(srctree)/include/asm-generic $(RCS_FIND_IGNORE) \
find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \
-name '*.[chS]' -print )
endef
......
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