[PATCH v3 6/7] buildtools/chkincs: use a staging directory for headers

Bruce Richardson bruce.richardson at intel.com
Thu Sep 25 10:00:00 CEST 2025


On Wed, Sep 24, 2025 at 07:25:34PM +0200, David Marchand wrote:
> A problem with the current headers check is that it relies on
> meson dependencies objects that come with their include_directories
> directives, and all of those point at the library / driver sources.
> 
> This means that we won't detect a public header including a private
> (as in, not exported) header, or a driver only header.
> 
> To address this issue, a staging directory is added and every header
> is copied to it.
> 
> Drivers and library headers are staged to two different directories
> and the check is updated accordingly.
> 
> Signed-off-by: David Marchand <david.marchand at redhat.com>

In general looks ok to me.
One small comment though - can we not have "staging" as a top-level
directory, but instead hide it inside the buildtools directory, or even the
chkincs directory? I dislike having too many subdirectories directly off
the root of the project, especially ones purely for internal tooling.

Acked-by: Bruce Richardson <bruce.richardson at intel.com>

> ---
>  MAINTAINERS                    |  3 +++
>  buildtools/chkincs/meson.build | 41 ++++++++++++++++------------------
>  buildtools/meson.build         |  1 +
>  buildtools/stage-headers.py    | 32 ++++++++++++++++++++++++++
>  drivers/meson.build            | 28 ++++++++++++++++++++---
>  lib/eal/include/meson.build    |  8 +++++++
>  lib/eal/meson.build            | 10 +++++++++
>  lib/meson.build                | 41 ++++++++++++++++++++++++++--------
>  meson.build                    |  4 ++++
>  staging/drivers/meson.build    |  5 +++++
>  staging/meson.build            |  7 ++++++
>  11 files changed, 146 insertions(+), 34 deletions(-)
>  create mode 100644 buildtools/stage-headers.py
>  create mode 100644 staging/drivers/meson.build
>  create mode 100644 staging/meson.build
> 


More information about the dev mailing list