Re: [PATCH] Update fs Makefiles

From: Kai Germaschewski (kai@tp1.ruhr-uni-bochum.de)
Date: Tue May 20 2003 - 11:38:45 EST


On Tue, 20 May 2003, Roman Zippel wrote:

> Has the new syntax any advantage, e.g. does it make sense to have adfs-m?
> Otherwise the -obj syntax looks IMO more readable and it directly says
> that this is a composite object.

Let me quote from Brian's patch:

diff -urN linux-2.5.69-bk/fs/ext3/Makefile linux/fs/ext3/Makefile
--- linux-2.5.69-bk/fs/ext3/Makefile 2003-05-17 23:55:01.000000000
-0400
+++ linux/fs/ext3/Makefile 2003-05-18 15:59:09.000000000 -0400
@@ -4,17 +4,9 @@

 obj-$(CONFIG_EXT3_FS) += ext3.o

-ext3-objs := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o
inode.o \
+ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o
inode.o \
                ioctl.o namei.o super.o symlink.o hash.o

-ifeq ($(CONFIG_EXT3_FS_XATTR),y)
-ext3-objs += xattr.o xattr_user.o xattr_trusted.o
-endif
-
-ifeq ($(CONFIG_EXT3_FS_POSIX_ACL),y)
-ext3-objs += acl.o
-endif
-
-ifeq ($(CONFIG_EXT3_FS_SECURITY),y)
-ext3-objs += xattr_security.o
-endif
+ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o
+ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
+ext3-$(CONFIG_EXT3_FS_SECURITY) += xattr_security.o

which I think clearly shows the benefits. I agree that "-objs" is more
intuitive than "-y", otoh it also has potential for confusion with
"obj-$(CONFIG_...)" (as kinda proven by your "-obj" quote above ;).

Basically, I think having "-y" is essential for uses like the one above,
the only question is whether to switch everything to "-y" or use "-y" for
multipart modules with optional parts and "-objs" for multipart modules
with a static list of components. For my opinion on that, see earlier this
thread...

--Kai

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri May 23 2003 - 22:00:41 EST