* [PATCH] Makefile, CONFIG_MODVERSIONS, ignore *.mod.c files
@ 2014-02-05 15:01 Prarit Bhargava
2014-02-05 15:05 ` Michal Marek
0 siblings, 1 reply; 4+ messages in thread
From: Prarit Bhargava @ 2014-02-05 15:01 UTC (permalink / raw)
To: linux-kernel
Cc: Prarit Bhargava, Michal Marek, Andrew Morton, Kirill Tkhai,
Michael Opdenacker, Rusty Russell, linux-kbuild
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 *.mod.c to the RCS_FIND_IGNORE in the top-level Makefile and to the ignore
list in scripts/tags.sh.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
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>
Cc: linux-kbuild@vger.kernel.org
---
Makefile | 3 ++-
scripts/tags.sh | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 606ef7c..4e1b87a 100644
--- a/Makefile
+++ b/Makefile
@@ -415,7 +415,8 @@ export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_ve
# Files to ignore in find ... statements
RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \
- -o -name .pc -o -name .hg -o -name .git \) -prune -o
+ -o -name .pc -o -name .hg -o -name .git -o -name *.mod.c\) \
+ -prune -o
export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
--exclude CVS --exclude .pc --exclude .hg --exclude .git
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 58c4559..6229d6b 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -14,7 +14,7 @@ fi
# This is a duplicate of RCS_FIND_IGNORE without escaped '()'
ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \
-name CVS -o -name .pc -o -name .hg -o \
- -name .git ) \
+ -name .git -o -name *.mod.c ) \
-prune -o"
# Do not use full path if we do not use O=.. builds
--
1.7.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Makefile, CONFIG_MODVERSIONS, ignore *.mod.c files
2014-02-05 15:01 [PATCH] Makefile, CONFIG_MODVERSIONS, ignore *.mod.c files Prarit Bhargava
@ 2014-02-05 15:05 ` Michal Marek
2014-02-05 15:08 ` Prarit Bhargava
0 siblings, 1 reply; 4+ messages in thread
From: Michal Marek @ 2014-02-05 15:05 UTC (permalink / raw)
To: Prarit Bhargava, linux-kernel
Cc: Andrew Morton, Kirill Tkhai, Michael Opdenacker, Rusty Russell,
linux-kbuild
On 2014-02-05 16:01, Prarit Bhargava wrote:
> Add *.mod.c to the RCS_FIND_IGNORE in the top-level Makefile and to the ignore
> list in scripts/tags.sh.
This breaks make clean, which is supposed to remove the *.mod.c files.
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Makefile, CONFIG_MODVERSIONS, ignore *.mod.c files
2014-02-05 15:05 ` Michal Marek
@ 2014-02-05 15:08 ` Prarit Bhargava
2014-02-05 15:16 ` Michal Marek
0 siblings, 1 reply; 4+ messages in thread
From: Prarit Bhargava @ 2014-02-05 15:08 UTC (permalink / raw)
To: Michal Marek
Cc: linux-kernel, Andrew Morton, Kirill Tkhai, Michael Opdenacker,
Rusty Russell, linux-kbuild
On 02/05/2014 10:05 AM, Michal Marek wrote:
> On 2014-02-05 16:01, Prarit Bhargava wrote:
>> Add *.mod.c to the RCS_FIND_IGNORE in the top-level Makefile and to the ignore
>> list in scripts/tags.sh.
>
>
> This breaks make clean, which is supposed to remove the *.mod.c files.
>
Michal,
Oops. :(. So just the scripts/tags.sh needs to modified. I'll resubmit just
that patch unless you have a better suggestion.
P.
> Michal
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Makefile, CONFIG_MODVERSIONS, ignore *.mod.c files
2014-02-05 15:08 ` Prarit Bhargava
@ 2014-02-05 15:16 ` Michal Marek
0 siblings, 0 replies; 4+ messages in thread
From: Michal Marek @ 2014-02-05 15:16 UTC (permalink / raw)
To: Prarit Bhargava
Cc: linux-kernel, Andrew Morton, Kirill Tkhai, Michael Opdenacker,
Rusty Russell, linux-kbuild
On 2014-02-05 16:08, Prarit Bhargava wrote:
>
>
> On 02/05/2014 10:05 AM, Michal Marek wrote:
>> On 2014-02-05 16:01, Prarit Bhargava wrote:
>>> Add *.mod.c to the RCS_FIND_IGNORE in the top-level Makefile and to the ignore
>>> list in scripts/tags.sh.
>>
>>
>> This breaks make clean, which is supposed to remove the *.mod.c files.
>>
>
> Michal,
>
> Oops. :(. So just the scripts/tags.sh needs to modified. I'll resubmit just
> that patch unless you have a better suggestion.
Please directly change the find command in find_arch_sources() and
find_include_sources(), so that the $ignore variable is really
equivalent to $RCS_FIND_IGNORE. I'm actually wondering why we do not
simply use $RCS_FIND_IGNORE in the script.
Thanks,
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-05 15:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 15:01 [PATCH] Makefile, CONFIG_MODVERSIONS, ignore *.mod.c files Prarit Bhargava
2014-02-05 15:05 ` Michal Marek
2014-02-05 15:08 ` Prarit Bhargava
2014-02-05 15:16 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox