kbuild: add support for ensuring headers are self-contained
authorJani Nikula <jani.nikula@intel.com>
Tue, 4 Jun 2019 12:42:48 +0000 (15:42 +0300)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 15 Jun 2019 10:57:02 +0000 (19:57 +0900)
commite846f0dc57f441e5e93194d39bc9b8ac2ab5e0a4
treeb58f3a2e11125b3ed4f35f0c0c14380e3374b9db
parent0315bb7a25267bfeee2a7aaed5d1b4ba915e0c53
kbuild: add support for ensuring headers are self-contained

Sometimes it's useful to be able to explicitly ensure certain headers
remain self-contained, i.e. that they are compilable as standalone
units, by including and/or forward declaring everything they depend on.

Add special target header-test-y where individual Makefiles can add
headers to be tested if CONFIG_HEADER_TEST is enabled. This will
generate a dummy C file per header that gets built as part of extra-y.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
.gitignore
Documentation/dontdiff
Documentation/kbuild/makefiles.txt
Makefile
drivers/gpu/drm/i915/.gitignore [deleted file]
drivers/gpu/drm/i915/Makefile.header-test
init/Kconfig
scripts/Makefile.build
scripts/Makefile.lib