meson: move declarations of timedated and friends

This commit is contained in:
Yu Watanabe 2023-06-25 16:04:32 +09:00
parent 069e7e04ec
commit 269ab341e6
3 changed files with 35 additions and 48 deletions

View File

@ -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',

View File

@ -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)

View File

@ -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',