summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.asm-generic
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-03-17 03:01:08 +0100
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-03-17 04:56:31 +0100
commit7cbbbb8bc2974264bbbf326d9a4552fc8878d375 (patch)
treef5a3c927cd662dc9fac451335097de0205d6f087 /scripts/Makefile.asm-generic
parentRevert "modsign: Abort modules_install when signing fails" (diff)
downloadlinux-7cbbbb8bc2974264bbbf326d9a4552fc8878d375.tar.xz
linux-7cbbbb8bc2974264bbbf326d9a4552fc8878d375.zip
kbuild: warn redundant generic-y
The generic-y is redundant under the following condition: - arch has its own implementation - the same header is added to generated-y - the same header is added to mandatory-y If a redundant generic-y is found, the warning like follows is displayed: scripts/Makefile.asm-generic:20: redundant generic-y found in arch/arm/include/asm/Kbuild: timex.h I fixed up arch Kbuild files found by this. Suggested-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to '')
-rw-r--r--scripts/Makefile.asm-generic6
1 files 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)))