]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: move declarations of timedated and friends 28608/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 25 Jun 2023 07:04:32 +0000 (16:04 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 31 Jul 2023 20:52:50 +0000 (05:52 +0900)
meson.build
src/timedate/meson.build
src/timesync/meson.build

index b2b102bab5e45e6db829bf1b14eff0794cf50010..6e79e2dd670e5cd098fd04abe66e7a31652fe55c 100644 (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',
index 6eb9607e084615441c8b61c622f6c205fe9aa7c1..48054bb6041bd055a28049f83d5d4ff7631c9f95 100644 (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)
index 54f5b18a3aa6145f20ab08ad8f88909418be7a4d..54ae6a9e73e4e36fad1ab9e6dc5324cd55eadd3c 100644 (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',