diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-11-07 16:14:41 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-05 16:43:47 +0100 |
commit | ecd77a3261ab58bb07bc00cf3ca57f052764be5b (patch) | |
tree | 74386cd7103a3b52b23e2409247c255cd4b6bf8a /usr | |
parent | ef134d8b493c537b81e8cbd56704efff0b402d8a (diff) | |
download | linux-stable-ecd77a3261ab58bb07bc00cf3ca57f052764be5b.tar.gz linux-stable-ecd77a3261ab58bb07bc00cf3ca57f052764be5b.tar.bz2 linux-stable-ecd77a3261ab58bb07bc00cf3ca57f052764be5b.zip |
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>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/include/Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/include/Makefile b/usr/include/Makefile index fa38ad32a6f0..47cb91d3a51d 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -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) |