diff options
| author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-03-16 22:01:08 -0400 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-03-16 23:56:31 -0400 |
| commit | 7cbbbb8bc2974264bbbf326d9a4552fc8878d375 (patch) | |
| tree | f5a3c927cd662dc9fac451335097de0205d6f087 /scripts | |
| parent | f84dde10d893cd368e73dda04b694169542ed792 (diff) | |
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 'scripts')
| -rw-r--r-- | scripts/Makefile.asm-generic | 6 |
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)) | |||
| 14 | 14 | ||
| 15 | include scripts/Kbuild.include | 15 | include scripts/Kbuild.include |
| 16 | 16 | ||
| 17 | redundant := $(filter $(mandatory-y) $(generated-y), $(generic-y)) | ||
| 18 | redundant += $(foreach f, $(generic-y), $(if $(wildcard $(srctree)/$(src)/$(f)),$(f))) | ||
| 19 | redundant := $(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. |
| 18 | mandatory-y := $(filter-out $(generated-y), $(mandatory-y)) | 24 | mandatory-y := $(filter-out $(generated-y), $(mandatory-y)) |
| 19 | generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f))) | 25 | generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f))) |
