author: Masahiro Yamada <masahiroy@kernel.org> 2019-12-19 00:34:21 +0900
committer: Masahiro Yamada <masahiroy@kernel.org> 2020-01-07 02:18:38 +0900
commit: 551197864ad5d8ed01137b7008448bd18b9731d5
parent: c79f46a282390e0f5b306007bf7b11a46d529538
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/usr/include/Makefile b/usr/include/Makefile
index 84598469e6ff..e90f5f7903bb 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -93,10 +93,11 @@ header-test- += asm-generic/%
extra-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/dev/null))
+# Include the header to detect missing include guard.
quiet_cmd_hdrtest = HDRTEST $<
cmd_hdrtest = \
$(CC) $(c_flags) -S -o /dev/null -x c /dev/null \
- $(if $(filter-out $(header-test-), $*.h), -include $<); \
+ $(if $(filter-out $(header-test-), $*.h), -include $< -include $<); \
$(PERL) $(srctree)/scripts/headers_check.pl $(obj) $(SRCARCH) $<; \
touch $@