From: "Stephen C. Tweedie" Subject: [Patch] blktap modular build fix Date: Wed, 27 Sep 2006 14:45:15 +0100 Message-ID: <1159364715.6276.21.camel@sisko.scot.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org [[[WARNING TO COMMITTER: this patch also requires blktap.c to be renamed to blktapmain.c in order to avoid the .c/module naming conflict.]]] The kernel blktap.c cannot build as a module: its makefile is broken for modular build, and it is also impossible to build a module from multiple .o files where the module name coincides with one of the source files. Signed-off-by: Stephen Tweedie diff --exclude-from=/dev/fd/63 -ur linux-2.6.18.noarch/drivers/xen/blktap/Makefile kernel-2.6.18.blktap/linux-2.6.18.noarch/drivers/xen/blktap/Makefile --- linux-2.6.18.noarch/drivers/xen/blktap/Makefile 2006-09-25 21:32:06.000000000 +0100 +++ kernel-2.6.18.blktap/linux-2.6.18.noarch/drivers/xen/blktap/Makefile 2006-09-21 20:25:09.000000000 +0100 @@ -1,3 +1,6 @@ LINUXINCLUDE += -I../xen/include/public/io -obj-y := xenbus.o interface.o blktap.o + +obj-$(CONFIG_XEN_BLKDEV_TAP) := blktap.o + +blktap-y := xenbus.o interface.o blktapmain.o