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>
Showing
- .gitignore 1 addition, 0 deletions.gitignore
- Documentation/dontdiff 1 addition, 0 deletionsDocumentation/dontdiff
- Documentation/kbuild/makefiles.txt 7 additions, 0 deletionsDocumentation/kbuild/makefiles.txt
- Makefile 1 addition, 0 deletionsMakefile
- drivers/gpu/drm/i915/.gitignore 0 additions, 1 deletiondrivers/gpu/drm/i915/.gitignore
- drivers/gpu/drm/i915/Makefile.header-test 1 addition, 11 deletionsdrivers/gpu/drm/i915/Makefile.header-test
- init/Kconfig 9 additions, 0 deletionsinit/Kconfig
- scripts/Makefile.build 9 additions, 0 deletionsscripts/Makefile.build
- scripts/Makefile.lib 3 additions, 0 deletionsscripts/Makefile.lib
Loading
Please register or sign in to comment