kbuild: remove header compile test
There are both positive and negative options about this feature. At first, I thought it was a good idea, but actually Linus stated a negative opinion (https://lkml.org/lkml/2019/9/29/227). I admit it is ugly and annoying. The baseline I'd like to keep is the compile-test of uapi headers. (Otherwise, kernel developers have no way to ensure the correctness of the exported headers.) I will maintain a small build rule in usr/include/Makefile. Remove the other header test functionality. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
@@ -95,9 +95,13 @@ endif
|
||||
# asm-generic/*.h is used by asm/*.h, and should not be included directly
|
||||
header-test- += asm-generic/%
|
||||
|
||||
# The rest are compile-tested
|
||||
header-test-y += $(filter-out $(header-test-), \
|
||||
$(patsubst $(obj)/%,%, $(wildcard \
|
||||
$(addprefix $(obj)/, *.h */*.h */*/*.h */*/*/*.h))))
|
||||
extra-y := $(patsubst %.h,%.hdrtest, $(filter-out $(header-test-), \
|
||||
$(patsubst $(obj)/%,%, $(shell find $(obj) -name '*.h'))))
|
||||
|
||||
quiet_cmd_hdrtest = HDRTEST $<
|
||||
cmd_hdrtest = $(CC) $(c_flags) -S -o /dev/null -x c /dev/null -include $<; touch $@
|
||||
|
||||
$(obj)/%.hdrtest: $(obj)/%.h FORCE
|
||||
$(call if_changed_dep,hdrtest)
|
||||
|
||||
clean-files += $(filter-out Makefile, $(notdir $(wildcard $(obj)/*)))
|
||||
|
||||
Reference in New Issue
Block a user