mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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>
This commit is contained in:
@@ -10,15 +10,15 @@ PHONY := all
|
||||
all:
|
||||
|
||||
src := $(subst /generated,,$(obj))
|
||||
-include $(src)/Kbuild
|
||||
|
||||
include $(srctree)/scripts/Kbuild.include
|
||||
-include $(kbuild-file)
|
||||
|
||||
# $(generic)/Kbuild lists mandatory-y. Exclude um since it is a special case.
|
||||
ifneq ($(SRCARCH),um)
|
||||
include $(srctree)/$(generic)/Kbuild
|
||||
endif
|
||||
|
||||
include $(srctree)/scripts/Kbuild.include
|
||||
|
||||
redundant := $(filter $(mandatory-y) $(generated-y), $(generic-y))
|
||||
redundant += $(foreach f, $(generic-y), $(if $(wildcard $(srctree)/$(src)/$(f)),$(f)))
|
||||
redundant := $(sort $(redundant))
|
||||
|
Reference in New Issue
Block a user