From 16b081d6ac757e2c1438624a2c43739fdb965784 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 25 Jun 2023 16:28:21 +0900 Subject: [PATCH] meson: move declarations of ac-power, detect-virt, sysctl, and sleep --- meson.build | 47 ++++--------------------------------- src/ac-power/meson.build | 9 +++++++ src/detect-virt/meson.build | 9 +++++++ src/sleep/meson.build | 13 ++++++++++ src/sysctl/meson.build | 9 +++++++ 5 files changed, 44 insertions(+), 43 deletions(-) create mode 100644 src/ac-power/meson.build create mode 100644 src/detect-virt/meson.build create mode 100644 src/sleep/meson.build create mode 100644 src/sysctl/meson.build diff --git a/meson.build b/meson.build index 257b591ff7d..190baf2154b 100644 --- a/meson.build +++ b/meson.build @@ -2370,6 +2370,7 @@ subdir('src/journal') # systemd-networkd requires 'libsystemd_network' subdir('src/libsystemd-network') +subdir('src/ac-power') subdir('src/analyze') subdir('src/backlight') subdir('src/binfmt') @@ -2380,6 +2381,7 @@ subdir('src/coredump') subdir('src/cryptenroll') subdir('src/cryptsetup') subdir('src/debug-generator') +subdir('src/detect-virt') subdir('src/dissect') subdir('src/environment-d-generator') subdir('src/firstboot') @@ -2416,7 +2418,9 @@ subdir('src/rfkill') subdir('src/rpm') subdir('src/run-generator') subdir('src/shutdown') +subdir('src/sleep') subdir('src/socket-activate') +subdir('src/sysctl') subdir('src/sysext') subdir('src/system-update-generator') subdir('src/systemctl') @@ -2588,49 +2592,6 @@ meson.add_install_script(meson_make_symlink, bindir / 'udevadm', libexecdir / 'systemd-udevd') -executable( - 'systemd-sleep', - 'src/sleep/sleep.c', - include_directories : includes, - link_with : [libshared], - dependencies : [userspace], - install_rpath : pkglibdir, - install : true, - install_dir : libexecdir) - -if install_sysconfdir_samples - install_data('src/sleep/sleep.conf', - install_dir : pkgsysconfdir) -endif - -public_programs += executable( - 'systemd-sysctl', - 'src/sysctl/sysctl.c', - include_directories : includes, - link_with : [libshared], - dependencies : [userspace], - install_rpath : pkglibdir, - install : true, - install_dir : libexecdir) - -public_programs += executable( - 'systemd-ac-power', - 'src/ac-power/ac-power.c', - include_directories : includes, - link_with : [libshared], - dependencies : [userspace], - install_rpath : pkglibdir, - install : true) - -public_programs += executable( - 'systemd-detect-virt', - 'src/detect-virt/detect-virt.c', - include_directories : includes, - link_with : [libshared], - dependencies : [userspace], - install_rpath : pkglibdir, - install : true) - public_programs += executable( 'systemd-delta', 'src/delta/delta.c', diff --git a/src/ac-power/meson.build b/src/ac-power/meson.build new file mode 100644 index 00000000000..032c027de40 --- /dev/null +++ b/src/ac-power/meson.build @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +executables += [ + executable_template + { + 'name' : 'systemd-ac-power', + 'public' : true, + 'sources' : files('ac-power.c'), + }, +] diff --git a/src/detect-virt/meson.build b/src/detect-virt/meson.build new file mode 100644 index 00000000000..7bcb298d1fe --- /dev/null +++ b/src/detect-virt/meson.build @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +executables += [ + executable_template + { + 'name' : 'systemd-detect-virt', + 'public' : true, + 'sources' : files('detect-virt.c'), + }, +] diff --git a/src/sleep/meson.build b/src/sleep/meson.build new file mode 100644 index 00000000000..ba7486b19ea --- /dev/null +++ b/src/sleep/meson.build @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +executables += [ + libexec_template + { + 'name' : 'systemd-sleep', + 'sources' : files('sleep.c'), + }, +] + +if install_sysconfdir_samples + install_data('sleep.conf', + install_dir : pkgsysconfdir) +endif diff --git a/src/sysctl/meson.build b/src/sysctl/meson.build new file mode 100644 index 00000000000..1fb85c21914 --- /dev/null +++ b/src/sysctl/meson.build @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +executables += [ + libexec_template + { + 'name' : 'systemd-sysctl', + 'public' : true, + 'sources' : files('sysctl.c'), + }, +]