author: Masahiro Yamada <yamada.masahiro@socionext.com> 2019-03-17 11:01:08 +0900
committer: Masahiro Yamada <yamada.masahiro@socionext.com> 2019-03-17 12:56:31 +0900
commit: 7cbbbb8bc2974264bbbf326d9a4552fc8878d375
parent: f84dde10d893cd368e73dda04b694169542ed792
Commit Summary:
Diffstat:
1 file changed, 6 insertions, 0 deletions
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic
index a62d2823f6cf..c7d2b7acad26 100644
--- a/scripts/Makefile.asm-generic
+++ b/scripts/Makefile.asm-generic
@@ -14,6 +14,12 @@ src := $(subst /generated,,$(obj))
include 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))
+$(if $(redundant),\
+ $(warning redundant generic-y found in $(src)/Kbuild: $(redundant)))
+
# If arch does not implement mandatory headers, fallback to asm-generic ones.
mandatory-y := $(filter-out $(generated-y), $(mandatory-y))
generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f)))