]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Run clang-tidy on libsystemd headers as well 37566/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 22 May 2025 09:06:54 +0000 (11:06 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 22 May 2025 09:25:32 +0000 (11:25 +0200)
meson.build
src/systemd/meson.build

index 733390ae8f671248615476efde64c8d9b01790c4..4618520bcae82dbf8c471cc86cc7616ca9f360ff 100644 (file)
@@ -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
 
index eae027dafa2109678c1e4465724ab3e2c0b06e65..613806c2f9a388591d5912bfd07313440edcaaf7 100644 (file)
@@ -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',