]> git.hungrycats.org Git - linux/commitdiff
do_mounts: Fix CONFIG_BLK_DEV_MD=m case
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Sun, 2 Mar 2003 16:33:44 +0000 (10:33 -0600)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Sun, 2 Mar 2003 16:33:44 +0000 (10:33 -0600)
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

index 11048ebb47133d921472d40ccd408aa6c4c2b2bb..8d501dd326ea94d69609119c4284f36982d38a63 100644 (file)
@@ -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