diff --git a/meson.build b/meson.build index 733390ae8f..4618520bca 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 eae027dafa..613806c2f9 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',