* [PATCH 4/4] block: move CONFIG_BLOCK guard to top Makefile
[not found] <20210528184435.252924-1-masahiroy@kernel.org>
@ 2021-05-28 18:44 ` Masahiro Yamada
0 siblings, 0 replies; only message in thread
From: Masahiro Yamada @ 2021-05-28 18:44 UTC (permalink / raw)
To: Jens Axboe, linux-block
Cc: Masahiro Yamada, Michal Marek, linux-kbuild, linux-kernel
Every object under block/ depends on CONFIG_BLOCK.
Move the guard to the top Makefile since there is no point to
descend into block/ if CONFIG_BLOCK=n.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Makefile | 3 ++-
block/Makefile | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 88cb5b59109c..055dcf5a2704 100644
--- a/Makefile
+++ b/Makefile
@@ -1095,7 +1095,8 @@ export MODORDER := $(extmod_prefix)modules.order
export MODULES_NSDEPS := $(extmod_prefix)modules.nsdeps
ifeq ($(KBUILD_EXTMOD),)
-core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
+core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/
+core-$(CONFIG_BLOCK) += block/
vmlinux-dirs := $(patsubst %/,%,$(filter %/, \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
diff --git a/block/Makefile b/block/Makefile
index 8d841f5f986f..99f0757a3aa5 100644
--- a/block/Makefile
+++ b/block/Makefile
@@ -3,7 +3,7 @@
# Makefile for the kernel block layer
#
-obj-$(CONFIG_BLOCK) := bio.o elevator.o blk-core.o blk-sysfs.o \
+obj-y := bio.o elevator.o blk-core.o blk-sysfs.o \
blk-flush.o blk-settings.o blk-ioc.o blk-map.o \
blk-exec.o blk-merge.o blk-timeout.o \
blk-lib.o blk-mq.o blk-mq-tag.o blk-stat.o \
--
2.27.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-28 18:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210528184435.252924-1-masahiroy@kernel.org>
2021-05-28 18:44 ` [PATCH 4/4] block: move CONFIG_BLOCK guard to top Makefile Masahiro Yamada
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).