mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
kbuild: move headers_check rule to usr/include/Makefile
commit 7ecaf069da52e472d393f03e79d721aabd724166 upstream. Currently, some sanity checks for uapi headers are done by scripts/headers_check.pl, which is wired up to the 'headers_check' target in the top Makefile. It is true compiling headers has better test coverage, but there are still several headers excluded from the compile test. I like to keep headers_check.pl for a while, but we can delete a lot of code by moving the build rule to usr/include/Makefile. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ef134d8b49
commit
ecd77a3261
4 changed files with 9 additions and 40 deletions
|
|
@ -99,11 +99,14 @@ endif
|
|||
# asm-generic/*.h is used by asm/*.h, and should not be included directly
|
||||
header-test- += asm-generic/%
|
||||
|
||||
extra-y := $(patsubst %.h,%.hdrtest, $(filter-out $(header-test-), \
|
||||
$(patsubst $(obj)/%,%, $(shell find $(obj) -name '*.h'))))
|
||||
extra-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h'))
|
||||
|
||||
quiet_cmd_hdrtest = HDRTEST $<
|
||||
cmd_hdrtest = $(CC) $(c_flags) -S -o /dev/null -x c /dev/null -include $<; touch $@
|
||||
cmd_hdrtest = \
|
||||
$(CC) $(c_flags) -S -o /dev/null -x c /dev/null \
|
||||
$(if $(filter-out $(header-test-), $*.h), -include $<); \
|
||||
$(PERL) $(srctree)/scripts/headers_check.pl $(obj) $(SRCARCH) $<; \
|
||||
touch $@
|
||||
|
||||
$(obj)/%.hdrtest: $(obj)/%.h FORCE
|
||||
$(call if_changed_dep,hdrtest)
|
||||
|
|
|
|||
Loading…
Reference in a new issue