From eae6fb05f5c6211e416378712a146cfdcb1c6c69 Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Sun, 2 Mar 2003 10:33:44 -0600 Subject: [PATCH] do_mounts: Fix CONFIG_BLK_DEV_MD=m case We don't really have a nice way to say "compile this when CONFIG_FOO is y, don't otherwise". Alternatives are: obj-$(subst m,,$(CONFIG_FOO)) := foo.o or obj-$(CONFIG_FOO) := foo.o obj-m := or obj-y := do_foo.o do_foo-$(CONFIG_FOO) := foo.o I chose the last one, though I'm not particularly happy with either. --- init/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/init/Makefile b/init/Makefile index 11048ebb47133..8d501dd326ea9 100644 --- a/init/Makefile +++ b/init/Makefile @@ -2,10 +2,11 @@ # Makefile for the linux kernel. # -obj-y := main.o version.o do_mounts.o initramfs.o -obj-$(CONFIG_DEVFS_FS) += do_mounts_devfs.o -obj-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o -obj-$(CONFIG_BLK_DEV_MD) += do_mounts_md.o +obj-y := main.o version.o mounts.o initramfs.o +mounts-y := do_mounts.o +mounts-$(CONFIG_DEVFS_FS) += do_mounts_devfs.o +mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o +mounts-$(CONFIG_BLK_DEV_MD) += do_mounts_md.o # files to be removed upon make clean clean-files := ../include/linux/compile.h -- 2.53.0