2014-04-14 06:56:43

by Zhao, Gang

[permalink] [raw]
Subject: [PATCH] .gitignore: ignore Module.symvers in all directories

When using `make M=/path/to/driver modules` to build a module, file
Module.symvers will be created in that directory, so it's better to
ignore it in all directories.

Slightly reordered, let specific file names behind general ones.

Cc: Andrew Morton <[email protected]>
Cc: Kyungsik Lee <[email protected]>
Cc: Markus Trippelsdorf <[email protected]>
Signed-off-by: Zhao, Gang <[email protected]>
---
.gitignore | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 7e9932e..3aa8145 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,7 +22,6 @@
*.lst
*.symtypes
*.order
-modules.builtin
*.elf
*.bin
*.gz
@@ -33,6 +32,8 @@ modules.builtin
*.lzo
*.patch
*.gcno
+modules.builtin
+Module.symvers

#
# Top-level generic files
@@ -44,7 +45,6 @@ modules.builtin
/vmlinuz
/System.map
/Module.markers
-/Module.symvers

#
# Debian directory (make deb-pkg)
--
1.9.0


2014-04-16 21:08:30

by Michal Marek

[permalink] [raw]
Subject: Re: [PATCH] .gitignore: ignore Module.symvers in all directories

On Mon, Apr 14, 2014 at 02:56:15PM +0800, Zhao, Gang wrote:
> When using `make M=/path/to/driver modules` to build a module, file
> Module.symvers will be created in that directory, so it's better to
> ignore it in all directories.
>
> Slightly reordered, let specific file names behind general ones.
>
> Cc: Andrew Morton <[email protected]>
> Cc: Kyungsik Lee <[email protected]>
> Cc: Markus Trippelsdorf <[email protected]>
> Signed-off-by: Zhao, Gang <[email protected]>

Note that the easier way to build a subtree of the kernel source is

make path/to/driver/

including the trailing /. But the M=... syntax seems so widespread that
I have to apply this.

BTW: there is really no need to CC the last N people who touched
such a trivial file :).

Michal

2014-04-17 09:17:56

by Zhao, Gang

[permalink] [raw]
Subject: Re: [PATCH] .gitignore: ignore Module.symvers in all directories

On Wed, 2014-04-16 at 23:08:26 +0200, Michal Marek wrote:
> On Mon, Apr 14, 2014 at 02:56:15PM +0800, Zhao, Gang wrote:
>> When using `make M=/path/to/driver modules` to build a module, file
>> Module.symvers will be created in that directory, so it's better to
>> ignore it in all directories.
>>
>> Slightly reordered, let specific file names behind general ones.
>>
>> Cc: Andrew Morton <[email protected]>
>> Cc: Kyungsik Lee <[email protected]>
>> Cc: Markus Trippelsdorf <[email protected]>
>> Signed-off-by: Zhao, Gang <[email protected]>
>
> Note that the easier way to build a subtree of the kernel source is
>
> make path/to/driver/
>
Thanks for pointing out this.

> including the trailing /. But the M=... syntax seems so widespread that
> I have to apply this.
>
The M=... syntax is the first I learned to build a module. I think it's
popular because one can build out of tree drivers by using it(adding
C=...). As you said, it's better to use `make path/to/driver/` to build
in-tree drivers.

> BTW: there is really no need to CC the last N people who touched
> such a trivial file :).
>
./scripts/get_maintainer.pl doesn't return the maintainer of this
file. Maybe you can add this file to MAINTAINERS(telling you are the
maintainer), but it's really so trivial. :-)

> Michal