From 269ab341e6ff1b7ed2931649bd0d9629872c3374 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 25 Jun 2023 16:04:32 +0900 Subject: [PATCH] meson: move declarations of timedated and friends --- meson.build | 48 ---------------------------------------- src/timedate/meson.build | 16 ++++++++++++++ src/timesync/meson.build | 19 ++++++++++++++++ 3 files changed, 35 insertions(+), 48 deletions(-) diff --git a/meson.build b/meson.build index b2b102bab5e..6e79e2dd670 100644 --- a/meson.build +++ b/meson.build @@ -2581,54 +2581,6 @@ meson.add_install_script(meson_make_symlink, bindir / 'udevadm', libexecdir / 'systemd-udevd') -if conf.get('ENABLE_TIMEDATED') == 1 - dbus_programs += executable( - 'systemd-timedated', - 'src/timedate/timedated.c', - include_directories : includes, - link_with : [libshared], - dependencies : userspace, - install_rpath : pkglibdir, - install : true, - install_dir : libexecdir) -endif - -if conf.get('ENABLE_TIMEDATECTL') == 1 - public_programs += executable( - 'timedatectl', - 'src/timedate/timedatectl.c', - include_directories : includes, - install_rpath : pkglibdir, - link_with : [libshared], - dependencies : [libm, - userspace], - install : true) -endif - -if conf.get('ENABLE_TIMESYNCD') == 1 - executable( - 'systemd-timesyncd', - systemd_timesyncd_sources, - include_directories : includes, - link_with : [libtimesyncd_core], - dependencies : [libm, - threads, - userspace], - install_rpath : pkglibdir, - install : true, - install_dir : libexecdir) - - executable( - 'systemd-time-wait-sync', - 'src/timesync/wait-sync.c', - include_directories : includes, - link_with : [libtimesyncd_core], - dependencies : userspace, - install_rpath : pkglibdir, - install : true, - install_dir : libexecdir) -endif - if conf.get('ENABLE_MACHINED') == 1 dbus_programs += executable( 'systemd-machined', diff --git a/src/timedate/meson.build b/src/timedate/meson.build index 6eb9607e084..48054bb6041 100644 --- a/src/timedate/meson.build +++ b/src/timedate/meson.build @@ -1,5 +1,21 @@ # SPDX-License-Identifier: LGPL-2.1-or-later +executables += [ + libexec_template + { + 'name' : 'systemd-timedated', + 'dbus' : true, + 'conditions' : ['ENABLE_TIMEDATED'], + 'sources' : files('timedated.c'), + }, + executable_template + { + 'name' : 'timedatectl', + 'public' : true, + 'conditions' : ['ENABLE_TIMEDATECTL'], + 'sources' : files('timedatectl.c'), + 'dependencies' : libm, + }, +] + if conf.get('ENABLE_TIMEDATED') == 1 install_data('org.freedesktop.timedate1.conf', install_dir : dbuspolicydir) diff --git a/src/timesync/meson.build b/src/timesync/meson.build index 54f5b18a3aa..54ae6a9e73e 100644 --- a/src/timesync/meson.build +++ b/src/timesync/meson.build @@ -33,6 +33,25 @@ libtimesyncd_core = static_library( link_with : timesyncd_link_with, build_by_default : false) +executables += [ + libexec_template + { + 'name' : 'systemd-timesyncd', + 'conditions' : ['ENABLE_TIMESYNCD'], + 'sources' : systemd_timesyncd_sources, + 'link_with' : libtimesyncd_core, + 'dependencies' : [ + libm, + threads, + ], + }, + libexec_template + { + 'name' : 'systemd-time-wait-sync', + 'conditions' : ['ENABLE_TIMESYNCD'], + 'sources' : files('wait-sync.c'), + 'link_with' : libtimesyncd_core, + }, +] + custom_target( 'timesyncd.conf', input : 'timesyncd.conf.in',