From 54b59d914ee7f35f850b6cbeb2498cbc4b756eaa Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 22 May 2025 11:06:54 +0200 Subject: [PATCH] meson: Run clang-tidy on libsystemd headers as well --- meson.build | 4 ++-- src/systemd/meson.build | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 733390ae8f6..4618520bcae 100644 --- a/meson.build +++ b/meson.build @@ -2841,14 +2841,14 @@ alias_target('gensources', generated_sources) clang_tidy = find_program('clang-tidy', required : false) if meson.version().version_compare('>=1.4.0') foreach source : sources - if fs.name(source).endswith('.h') + if not source.full_path().endswith('.c') and not source.full_path().endswith('.h') continue endif inputs = [source] header = source.full_path().replace('.c', '.h') - if fs.exists(header) + if fs.exists(header) and header != source.full_path() inputs += header endif diff --git a/src/systemd/meson.build b/src/systemd/meson.build index eae027dafa2..613806c2f9a 100644 --- a/src/systemd/meson.build +++ b/src/systemd/meson.build @@ -52,6 +52,9 @@ _not_installed_headers = [ 'sd-resolve.h', ] +sources += systemd_headers +sources += files(_not_installed_headers) + install_headers( systemd_headers, '_sd-common.h', -- 2.47.3