summaryrefslogtreecommitdiff
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-11-19 04:15:50 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2022-11-22 23:40:02 +0900
commita2430b25c31840a6dcbf95c65415d5fee2984dbc (patch)
tree279c58348f88232abb0a350fed080547e94163c3 /scripts/Makefile.build
parent5724ac5589ad93d35d95a845222f566175c681b8 (diff)
kbuild: add kbuild-file macro
While building, installing, cleaning, Kbuild visits sub-directories and includes 'Kbuild' or 'Makefile' that exists there. Add 'kbuild-file' macro, and reuse it from scripts/Makefie.* Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Reviewed-by: Alexander Lobakin <alobakin@pm.me> Tested-by: Alexander Lobakin <alobakin@pm.me>
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r--scripts/Makefile.build6
1 files changed, 1 insertions, 5 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 41f3602fc8de..37cf88d076e8 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -38,11 +38,7 @@ subdir-ccflags-y :=
include $(srctree)/scripts/Kbuild.include
include $(srctree)/scripts/Makefile.compiler
-
-# The filename Kbuild has precedence over Makefile
-kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
-include $(or $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Makefile)
-
+include $(kbuild-file)
include $(srctree)/scripts/Makefile.lib
# Do not include hostprogs rules unless needed.