build: add header includes check
authorBruce Richardson <bruce.richardson@intel.com>
Fri, 29 Jan 2021 16:48:21 +0000 (16:48 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 29 Jan 2021 19:59:37 +0000 (20:59 +0100)
commit05050ac4ce99d199ef416bd3c1e08443ddb433eb
tree80fb2a1da9188d14abf6080e17f22abda9286479
parent2518704288342eb855a9e43dc3abd41ba1b9c98f
build: add header includes check

To verify that all DPDK headers are ok for inclusion directly in a C file,
and are not missing any other pre-requisite headers, we can auto-generate
for each header an empty C file that includes that header. Compiling these
files will throw errors if any header has unmet dependencies.

For some libraries, there may be some header files which are not for direct
inclusion, but rather are to be included via other header files. To allow
later checking of these files for missing includes, we separate out the
indirect include files from the direct ones.

To ensure ongoing compliance, we enable this build test as part of the
default x86 build in "test-meson-builds.sh".

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
20 files changed:
MAINTAINERS
buildtools/chkincs/gen_c_file_for_header.py [new file with mode: 0755]
buildtools/chkincs/main.c [new file with mode: 0644]
buildtools/chkincs/meson.build [new file with mode: 0644]
devtools/test-meson-builds.sh
doc/guides/contributing/coding_style.rst
doc/guides/rel_notes/release_21_02.rst
lib/librte_eal/include/meson.build
lib/librte_eal/x86/include/meson.build
lib/librte_ethdev/meson.build
lib/librte_hash/meson.build
lib/librte_ipsec/meson.build
lib/librte_lpm/meson.build
lib/librte_regexdev/meson.build
lib/librte_ring/meson.build
lib/librte_stack/meson.build
lib/librte_table/meson.build
lib/meson.build
meson.build
meson_options.txt