Re: Do I have to rename file when a module changes dependency from 1 file to 2 file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 18, 2012 at 05:19:57PM -0700, Tim Chen wrote:
> Currently I have a module foo that has only 1 file foo.c.  However, I
> need to add another assembly file (bar.S) to the module and wonder what
> is the best way to modify the Makefile without having to rename foo.c.
> 
> My original Makefile looks like:
> 
> obj-$(CONFIG_FOO) += foo.o
> 
> I have to rename foo.c to baz.c, then update the Makefile as below to
> get things to work.
> 
> obj-$(CONFIG_FOO) += foo.o
> foo-y := baz.o bar.S
> 
> However, is there a way to change the Makefile so I don't have to
> rename foo.c?  That will reduce the size of the patch I have to
> generate.  Any suggestions are greatly appreciated.

You need to rename the file - there are no other options.

With respect to patch size.
Patch 1/2 is the renaming + Makefile. If you use git use "-D -M" options IIRC.
Patch 2/2 is the actual code changes.

So you do not hide your code changes in the renaming.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux