diff options
author | Prarit Bhargava <prarit@redhat.com> | 2014-02-06 07:51:42 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2014-02-06 10:52:07 -0500 |
commit | ae63b2d7bdd9bd66b88843be0daf8e37d8f0b574 (patch) | |
tree | 2adf58988515c2a79319117b564c664a539a1350 | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) |
scripts/tags.sh: Ignore *.mod.c
CONFIG_MODVERSIONS=y results in a .mod.c for every compiled file in the
kernel. Issuing a 'make cscope' on a compiled kernel tree results in
the cscope files containing *.mod.c files.
[prarit@prarit linux]# make cscope
[prarit@prarit linux]# cat cscope.files | grep mod.c | wc -l
4807
These files are not useful for cscope and should be ignored. For example,
# line filename / context / line
1 105 arch/x86/kvm/kvm-intel.mod.c <<GLOBAL>>
{ 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },
2 508 drivers/block/mtip32xx/mtip32xx.h <<GLOBAL>>
int numa_node;
3 55 drivers/block/mtip32xx/mtip32xx.mod.c <<GLOBAL>>
{ 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },
4 37 drivers/cpufreq/acpi-cpufreq.mod.c <<GLOBAL>>
{ 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },
<snip>
Add an export to RCS_FIND_IGNORE so it can be used in scripts/tags.sh
and add explicitly ignore *.mod.c files.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kirill Tkhai <tkhai@yandex.ru>
Cc: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r-- | Makefile | 5 | ||||
-rwxr-xr-x | scripts/tags.sh | 9 |
2 files changed, 7 insertions, 7 deletions
@@ -414,8 +414,9 @@ export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_ve | |||
414 | 414 | ||
415 | # Files to ignore in find ... statements | 415 | # Files to ignore in find ... statements |
416 | 416 | ||
417 | RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ | 417 | export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \ |
418 | -o -name .pc -o -name .hg -o -name .git \) -prune -o | 418 | -name CVS -o -name .pc -o -name .hg -o -name .git \) \ |
419 | -prune -o | ||
419 | export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ | 420 | export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ |
420 | --exclude CVS --exclude .pc --exclude .hg --exclude .git | 421 | --exclude CVS --exclude .pc --exclude .hg --exclude .git |
421 | 422 | ||
diff --git a/scripts/tags.sh b/scripts/tags.sh index 58c455929091..f2c5b006a3d7 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
@@ -11,11 +11,10 @@ if [ "$KBUILD_VERBOSE" = "1" ]; then | |||
11 | set -x | 11 | set -x |
12 | fi | 12 | fi |
13 | 13 | ||
14 | # This is a duplicate of RCS_FIND_IGNORE without escaped '()' | 14 | # RCS_FIND_IGNORE has escaped ()s -- remove them. |
15 | ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \ | 15 | ignore="$(echo "$RCS_FIND_IGNORE" | sed 's|\\||g' )" |
16 | -name CVS -o -name .pc -o -name .hg -o \ | 16 | # tags and cscope files should also ignore MODVERSION *.mod.c files |
17 | -name .git ) \ | 17 | ignore="$ignore ( -name *.mod.c ) -prune -o" |
18 | -prune -o" | ||
19 | 18 | ||
20 | # Do not use full path if we do not use O=.. builds | 19 | # Do not use full path if we do not use O=.. builds |
21 | # Use make O=. {tags|cscope} | 20 | # Use make O=. {tags|cscope} |