History

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.

Masahiro Yamada committed 7 years ago

Commit 7cbbbb81 parent f84dde112 files · +6 −13Browse files

Showing the changes to scripts (1 of 12 files). Show all

Unified · Split

scripts/Makefile.asm-generic+6−0
@@ -14,6 +14,12 @@ src := $(subst /generated,,$(obj)) · 13 unmodified lines
14 14
15include scripts/Kbuild.include15include scripts/Kbuild.include
16 16
17redundant := $(filter $(mandatory-y) $(generated-y), $(generic-y))
18redundant += $(foreach f, $(generic-y), $(if $(wildcard $(srctree)/$(src)/$(f)),$(f)))
19redundant := $(sort $(redundant))
20$(if $(redundant),\
21 $(warning redundant generic-y found in $(src)/Kbuild: $(redundant)))
22
17# If arch does not implement mandatory headers, fallback to asm-generic ones.23# If arch does not implement mandatory headers, fallback to asm-generic ones.
18mandatory-y := $(filter-out $(generated-y), $(mandatory-y))24mandatory-y := $(filter-out $(generated-y), $(mandatory-y))
19generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f)))25generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f)))