From f727f3b963112b9f8d484ae50f5fa4107e1c1341 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 25 Jun 2023 15:15:56 +0900 Subject: [PATCH] meson: move declaration of systemd-analyze --- meson.build | 15 +-------------- src/analyze/meson.build | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/meson.build b/meson.build index 4b68ccfeddf..f8451ba7acb 100644 --- a/meson.build +++ b/meson.build @@ -2533,21 +2533,8 @@ endforeach ############################################################ -exe = executable( - 'systemd-analyze', - systemd_analyze_sources, - include_directories : core_includes, - link_with : [libcore, - libshared], - dependencies : [libseccomp, - userspace], - install_rpath : pkglibdir, - install : conf.get('ENABLE_ANALYZE') == 1) -if conf.get('ENABLE_ANALYZE') == 1 - public_programs += exe -endif - if want_tests != 'false' + exe = executables_by_name.get('systemd-analyze') test('test-compare-versions', test_compare_versions_sh, args : exe.full_path()) diff --git a/src/analyze/meson.build b/src/analyze/meson.build index 911c0bc3ed2..2bbcf26d1cb 100644 --- a/src/analyze/meson.build +++ b/src/analyze/meson.build @@ -33,6 +33,21 @@ systemd_analyze_sources = files( 'analyze.c', ) +executables += [ + executable_template + { + 'name' : 'systemd-analyze', + 'public' : conf.get('ENABLE_ANALYZE') == 1, + 'sources' : systemd_analyze_sources, + 'include_directories' : core_includes, + 'link_with' : [ + libcore, + libshared, + ], + 'dependencies' : libseccomp, + 'install' : conf.get('ENABLE_ANALYZE') == 1, + }, +] + tests += [ { 'sources' : files(