linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3 v2] kbuild/makefiles.txt: Fix examples and content
@ 2010-05-11 18:43 matt mooney
  2010-05-12  4:30 ` Américo Wang
  0 siblings, 1 reply; 5+ messages in thread
From: matt mooney @ 2010-05-11 18:43 UTC (permalink / raw)
  To: Randy Dunlap, linux-kbuild, linux-doc
  Cc: kernel-janitors, mec, kai, sam, jengelh


Update section 3.3 Loadable module goals - obj-m, from $(<module_name>-objs) to $(<module_name>-y) for easier addition of conditional objects to the module. The examples are also updated to reflect the current state of each Makefile used.

Signed-off-by: matt mooney <mfm@muteddisk.com>
---
v2: Changes are the same, added linux-kbuild@vger.kernel.org to list of recipients.

 Documentation/kbuild/makefiles.txt |   37 ++++++++++++++++++-----------------
 1 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 71c602d..b25507d 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -187,34 +187,35 @@ more details, with real examples.
 	Note: In this example $(CONFIG_ISDN_PPP_BSDCOMP) evaluates to 'm'

 	If a kernel module is built from several source files, you specify
-	that you want to build a module in the same way as above.
-
-	Kbuild needs to know which the parts that you want to build your
-	module from, so you have to tell it by setting an
-	$(<module_name>-objs) variable.
+	that you want to build a module in the same way as above; however,
+	kbuild needs to know which object files you want to build your
+	module from, so you have to tell it by setting a $(<module_name>-y)
+	variable.

 	Example:
 		#drivers/isdn/i4l/Makefile
-		obj-$(CONFIG_ISDN) += isdn.o
-		isdn-objs := isdn_net_lib.o isdn_v110.o isdn_common.o
+		obj-$(CONFIG_ISDN_I4L) += isdn.o
+		isdn-y := isdn_net_lib.o isdn_v110.o isdn_common.o

 	In this example, the module name will be isdn.o. Kbuild will
-	compile the objects listed in $(isdn-objs) and then run
+	compile the objects listed in $(isdn-y) and then run
 	"$(LD) -r" on the list of these files to generate isdn.o.

-	Kbuild recognises objects used for composite objects by the suffix
-	-objs, and the suffix -y. This allows the Makefiles to use
-	the value of a CONFIG_ symbol to determine if an object is part
-	of a composite object.
+	Due to kbuild recognizing $(<module_name>-y) for composite objects,
+	you can use the value of a CONFIG_ symbol to optionally include an
+	object file as part of a composite object.

 	Example:
 		#fs/ext2/Makefile
-	        obj-$(CONFIG_EXT2_FS)        += ext2.o
-		ext2-y                       := balloc.o bitmap.o
-	        ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o
-
-	In this example, xattr.o is only part of the composite object
-	ext2.o if $(CONFIG_EXT2_FS_XATTR) evaluates to 'y'.
+	        obj-$(CONFIG_EXT2_FS) += ext2.o
+		ext2-y := balloc.o dir.o file.o ialloc.o inode.o ioctl.o \
+			  namei.o super.o symlink.o
+	        ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o xattr_user.o \
+						xattr_trusted.o
+
+	In this example, xattr.o, xattr_user.o and xattr_trusted.o are only
+	part of the composite object ext2.o if $(CONFIG_EXT2_FS_XATTR)
+	evaluates to 'y'.

 	Note: Of course, when you are building objects into the kernel,
 	the syntax above will also work. So, if you have CONFIG_EXT2_FS=y,
--
1.6.6.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3 v2] kbuild/makefiles.txt: Fix examples and content
  2010-05-11 18:43 [PATCH 1/3 v2] kbuild/makefiles.txt: Fix examples and content matt mooney
@ 2010-05-12  4:30 ` Américo Wang
  2010-05-18 23:15   ` matt mooney
  2010-05-25 15:33   ` Randy Dunlap
  0 siblings, 2 replies; 5+ messages in thread
From: Américo Wang @ 2010-05-12  4:30 UTC (permalink / raw)
  To: matt mooney
  Cc: Randy Dunlap, linux-kbuild, linux-doc, kernel-janitors, mec, kai,
	sam, jengelh

On Tue, May 11, 2010 at 11:43:05AM -0700, matt mooney wrote:
>
>Update section 3.3 Loadable module goals - obj-m, from $(<module_name>-objs) to $(<module_name>-y) for easier addition of conditional objects to the module. The examples are also updated to reflect the current state of each Makefile used.
>
>Signed-off-by: matt mooney <mfm@muteddisk.com>


The whole patchset looks good to me, so,

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>

But note that I am not a native English-speaker, let's
see what Randy will say.

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3 v2] kbuild/makefiles.txt: Fix examples and content
  2010-05-12  4:30 ` Américo Wang
@ 2010-05-18 23:15   ` matt mooney
  2010-05-19  0:05     ` Randy Dunlap
  2010-05-25 15:33   ` Randy Dunlap
  1 sibling, 1 reply; 5+ messages in thread
From: matt mooney @ 2010-05-18 23:15 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Américo Wang, linux-kbuild, linux-doc, kernel-janitors, mec,
	kai, sam, jengelh

Hi Randy, 

Should I resubmit these and include the main list? Or just forget about
them? 

Thanks,
matt

On 12:30 Wed 12 May     , Américo Wang wrote:
> On Tue, May 11, 2010 at 11:43:05AM -0700, matt mooney wrote:
> >
> >Update section 3.3 Loadable module goals - obj-m, from $(<module_name>-objs) to $(<module_name>-y) for easier addition of conditional objects to the module. The examples are also updated to reflect the current state of each Makefile used.
> >
> >Signed-off-by: matt mooney <mfm@muteddisk.com>
> 
> 
> The whole patchset looks good to me, so,
> 
> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
> 
> But note that I am not a native English-speaker, let's
> see what Randy will say.
> 
> Thanks.
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3 v2] kbuild/makefiles.txt: Fix examples and content
  2010-05-18 23:15   ` matt mooney
@ 2010-05-19  0:05     ` Randy Dunlap
  0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2010-05-19  0:05 UTC (permalink / raw)
  To: matt mooney
  Cc: Américo Wang, linux-kbuild, linux-doc, kernel-janitors, mec,
	kai, sam, jengelh

On Tue, 18 May 2010 16:15:58 -0700 matt mooney wrote:

> Hi Randy, 
> 
> Should I resubmit these and include the main list? Or just forget about
> them? 

Hi Matt,
You should remind me about them.
I'll take care of them.  Thanks.


> Thanks,
> matt
> 
> On 12:30 Wed 12 May     , Américo Wang wrote:
> > On Tue, May 11, 2010 at 11:43:05AM -0700, matt mooney wrote:
> > >
> > >Update section 3.3 Loadable module goals - obj-m, from $(<module_name>-objs) to $(<module_name>-y) for easier addition of conditional objects to the module. The examples are also updated to reflect the current state of each Makefile used.
> > >
> > >Signed-off-by: matt mooney <mfm@muteddisk.com>
> > 
> > 
> > The whole patchset looks good to me, so,
> > 
> > Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
> > 
> > But note that I am not a native English-speaker, let's
> > see what Randy will say.
> > 
> > Thanks.
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3 v2] kbuild/makefiles.txt: Fix examples and content
  2010-05-12  4:30 ` Américo Wang
  2010-05-18 23:15   ` matt mooney
@ 2010-05-25 15:33   ` Randy Dunlap
  1 sibling, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2010-05-25 15:33 UTC (permalink / raw)
  To: Américo Wang
  Cc: matt mooney, Randy Dunlap, linux-kbuild, linux-doc,
	kernel-janitors, mec, kai, sam, jengelh

On Wed, 12 May 2010 12:30:38 +0800 Américo Wang wrote:

> On Tue, May 11, 2010 at 11:43:05AM -0700, matt mooney wrote:
> >
> >Update section 3.3 Loadable module goals - obj-m, from $(<module_name>-objs) to $(<module_name>-y) for easier addition of conditional objects to the module. The examples are also updated to reflect the current state of each Makefile used.
> >
> >Signed-off-by: matt mooney <mfm@muteddisk.com>
> 
> 
> The whole patchset looks good to me, so,
> 
> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
> 
> But note that I am not a native English-speaker, let's
> see what Randy will say.


Added all 3 patches to my patch queue.  Thanks, Matt.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-05-25 15:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11 18:43 [PATCH 1/3 v2] kbuild/makefiles.txt: Fix examples and content matt mooney
2010-05-12  4:30 ` Américo Wang
2010-05-18 23:15   ` matt mooney
2010-05-19  0:05     ` Randy Dunlap
2010-05-25 15:33   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).