diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:49:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:49:52 +0000 |
commit | 55944e5e40b1be2afc4855d8d2baf4b73d1876b5 (patch) | |
tree | 33f869f55a1b149e9b7c2b7e201867ca5dd52992 /src/systemctl/meson.build | |
parent | Initial commit. (diff) | |
download | systemd-55944e5e40b1be2afc4855d8d2baf4b73d1876b5.tar.xz systemd-55944e5e40b1be2afc4855d8d2baf4b73d1876b5.zip |
Adding upstream version 255.4.upstream/255.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/systemctl/meson.build')
-rw-r--r-- | src/systemctl/meson.build | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/src/systemctl/meson.build b/src/systemctl/meson.build new file mode 100644 index 0000000..255c639 --- /dev/null +++ b/src/systemctl/meson.build @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +systemctl_sources = files( + 'systemctl-add-dependency.c', + 'systemctl-cancel-job.c', + 'systemctl-clean-or-freeze.c', + 'systemctl-compat-halt.c', + 'systemctl-compat-runlevel.c', + 'systemctl-compat-shutdown.c', + 'systemctl-compat-telinit.c', + 'systemctl-daemon-reload.c', + 'systemctl-edit.c', + 'systemctl-enable.c', + 'systemctl-is-active.c', + 'systemctl-is-enabled.c', + 'systemctl-is-system-running.c', + 'systemctl-kill.c', + 'systemctl-list-dependencies.c', + 'systemctl-list-jobs.c', + 'systemctl-list-machines.c', + 'systemctl-list-unit-files.c', + 'systemctl-list-units.c', + 'systemctl-log-setting.c', + 'systemctl-logind.c', + 'systemctl-mount.c', + 'systemctl-preset-all.c', + 'systemctl-reset-failed.c', + 'systemctl-service-watchdogs.c', + 'systemctl-set-default.c', + 'systemctl-set-environment.c', + 'systemctl-set-property.c', + 'systemctl-show.c', + 'systemctl-start-special.c', + 'systemctl-start-unit.c', + 'systemctl-switch-root.c', + 'systemctl-sysv-compat.c', + 'systemctl-trivial-method.c', + 'systemctl-util.c', + 'systemctl-whoami.c', + 'systemctl.c', +) + +if get_option('link-systemctl-shared') + systemctl_link_with = [libshared] +else + systemctl_link_with = [libsystemd_static, + libshared_static, + 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, + ], + }, + fuzz_template + { + 'sources' : [ + files('fuzz-systemctl-parse-argv.c'), + systemctl_sources, + ], + 'link_with' : systemctl_link_with, + 'c_args' : ['-DFUZZ_SYSTEMCTL_PARSE_ARGV'], + }, +] + +foreach alias : (['halt', 'poweroff', 'reboot', 'shutdown'] + + (conf.get('HAVE_SYSV_COMPAT') == 1 ? ['runlevel', 'telinit'] : [])) + install_emptydir(sbindir) + meson.add_install_script(sh, '-c', + ln_s.format(bindir / 'systemctl', + sbindir / alias)) +endforeach |