Message ID | 20191218153422.14557-1-masahiroy@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] kbuild: detect missing include guard for exported headers | expand |
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 $@