Re: [dpdk-dev] [PATCH v6 5/8] build: separate out headers for include checking
From: Bruce Richardson <hidden>
Date: 2021-01-28 11:24:13
On Thu, Jan 28, 2021 at 12:07:11PM +0100, Thomas Monjalon wrote:
27/01/2021 18:33, Bruce Richardson:quoted
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. Signed-off-by: Bruce Richardson <redacted>[...]quoted
+ When ``check_includes`` build option is set to ``true``, each header file + has additional checks performed on it, for example to ensure that it is + not missing any include statements for dependent headers. + For header files which are public, but only included indirectly in + applications, these checks can be skipped by using the ``headers_no_chkincs`` + variable rather than ``headers``. + +headers_no_chkincs + **Default Value = []**. + As with ``headers`` option above, except that the files are not checked + for all needed include files as part of a DPDK build when + ``check_includes`` is set to ``true``.If all such headers are included directly, I would prefer naming this group "indirect_headers" because maybe we will want to do other kind of processing on indirect headers.
Sure. The current naming was chosen so that a grep of the code for on receiving errors about "chkincs" would show this up, but I think your suggestion is better.
[...]quoted
--- a/meson_options.txt +++ b/meson_options.txt@@ -1,5 +1,7 @@ # Please keep these options sorted alphabetically. +option('check_includes', type: 'boolean', value: false, + description: 'build "chkincs" to verify each header file can compile alone')This should in the patch introducing the check?
It was originally, but then we hit an issue with wanting/needing to refer to this option in the documentation about splitting the header file lists. Therefore, I decided to add the option in this patch. Alternatively, this patch and the next can be merged into one.