From: Yu Watanabe Date: Sun, 25 Jun 2023 06:44:30 +0000 (+0900) Subject: meson: move declaration of systemctl X-Git-Tag: v255-rc1~861^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2121630860422aa318f3e41fc5d5558548dfd2a;p=thirdparty%2Fsystemd.git meson: move declaration of systemctl --- diff --git a/meson.build b/meson.build index 36453bfcd1e..27166ed58a4 100644 --- a/meson.build +++ b/meson.build @@ -2570,22 +2570,6 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('ENABLE_BOOTLOADER') == 1 endif endif -systemctl = executable( - 'systemctl', - systemctl_sources, - include_directories : includes, - link_with : systemctl_link_with, - dependencies : [libcap, - liblz4, - libselinux, - libxz, - libzstd, - threads, - userspace], - install_rpath : pkglibdir, - install : true) -public_programs += systemctl - if conf.get('ENABLE_PORTABLED') == 1 if get_option('link-portabled-shared') portabled_link_with = [libshared] @@ -2739,13 +2723,6 @@ if conf.get('ENABLE_HOMED') == 1 endif endif -foreach alias : (['halt', 'poweroff', 'reboot', 'shutdown'] + - (conf.get('HAVE_SYSV_COMPAT') == 1 ? ['runlevel', 'telinit'] : [])) - meson.add_install_script(meson_make_symlink, - bindir / 'systemctl', - sbindir / alias) -endforeach - meson.add_install_script(meson_make_symlink, bindir / 'udevadm', libexecdir / 'systemd-udevd') @@ -3481,6 +3458,7 @@ systemd_id128 = executable( public_programs += systemd_id128 if want_tests != 'false' + systemctl = executables_by_name.get('systemctl') test('test-systemctl-enable', test_systemctl_enable_sh, # https://github.com/mesonbuild/meson/issues/2681 diff --git a/src/systemctl/meson.build b/src/systemctl/meson.build index f45cbc47d30..e7e1a1964b9 100644 --- a/src/systemctl/meson.build +++ b/src/systemctl/meson.build @@ -48,6 +48,30 @@ else libbasic_gcrypt] endif +executables += [ + executable_template + { + 'name' : 'systemctl', + 'public' : true, + 'sources' : systemctl_sources, + 'link_with' : systemctl_link_with, + 'dependencies' : [ + libcap, + liblz4, + libselinux, + libxz, + libzstd, + threads, + ], + }, +] + +foreach alias : (['halt', 'poweroff', 'reboot', 'shutdown'] + + (conf.get('HAVE_SYSV_COMPAT') == 1 ? ['runlevel', 'telinit'] : [])) + meson.add_install_script(meson_make_symlink, + bindir / 'systemctl', + sbindir / alias) +endforeach + fuzzers += [ { 'sources' : [