meson: move declarations of backlight, rfkill, and sysupdate-generator
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 25 Jun 2023 06:55:33 +0000 (15:55 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 31 Jul 2023 20:52:50 +0000 (05:52 +0900)
meson.build
src/backlight/meson.build [new file with mode: 0644]
src/rfkill/meson.build [new file with mode: 0644]
src/system-update-generator/meson.build [new file with mode: 0644]

index 7f3eb9918828709ba168d0689997d9a8062fe044..eb00b228f9f614e2c18e7ef737cd867e822cdc52 100644 (file)
@@ -2371,6 +2371,7 @@ subdir('src/journal')
 subdir('src/libsystemd-network')
 
 subdir('src/analyze')
+subdir('src/backlight')
 subdir('src/boot')
 subdir('src/boot/efi')
 subdir('src/busctl')
@@ -2403,11 +2404,13 @@ subdir('src/partition')
 subdir('src/portable')
 subdir('src/pstore')
 subdir('src/resolve')
+subdir('src/rfkill')
 subdir('src/rpm')
 subdir('src/run-generator')
 subdir('src/shutdown')
 subdir('src/socket-activate')
 subdir('src/sysext')
+subdir('src/system-update-generator')
 subdir('src/systemctl')
 subdir('src/sysupdate')
 subdir('src/timedate')
@@ -2574,40 +2577,6 @@ meson.add_install_script(meson_make_symlink,
                          bindir / 'udevadm',
                          libexecdir / 'systemd-udevd')
 
-if conf.get('ENABLE_BACKLIGHT') == 1
-        executable(
-                'systemd-backlight',
-                'src/backlight/backlight.c',
-                include_directories : includes,
-                link_with : [libshared],
-                dependencies : userspace,
-                install_rpath : pkglibdir,
-                install : true,
-                install_dir : libexecdir)
-endif
-
-if conf.get('ENABLE_RFKILL') == 1
-        executable(
-                'systemd-rfkill',
-                'src/rfkill/rfkill.c',
-                include_directories : includes,
-                link_with : [libshared],
-                dependencies : userspace,
-                install_rpath : pkglibdir,
-                install : true,
-                install_dir : libexecdir)
-endif
-
-executable(
-        'systemd-system-update-generator',
-        'src/system-update-generator/system-update-generator.c',
-        include_directories : includes,
-        link_with : [libshared],
-        dependencies : userspace,
-        install_rpath : pkglibdir,
-        install : true,
-        install_dir : systemgeneratordir)
-
 if conf.get('HAVE_LIBCRYPTSETUP') == 1
         executable(
                 'systemd-cryptsetup',
diff --git a/src/backlight/meson.build b/src/backlight/meson.build
new file mode 100644 (file)
index 0000000..ed4c55e
--- /dev/null
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+executables += [
+        libexec_template + {
+                'name' : 'systemd-backlight',
+                'conditions' : ['ENABLE_BACKLIGHT'],
+                'sources' : files('backlight.c'),
+        },
+]
diff --git a/src/rfkill/meson.build b/src/rfkill/meson.build
new file mode 100644 (file)
index 0000000..aa13b00
--- /dev/null
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+executables += [
+        libexec_template + {
+                'name' : 'systemd-rfkill',
+                'conditions' : ['ENABLE_RFKILL'],
+                'sources' : files('rfkill.c'),
+        },
+]
diff --git a/src/system-update-generator/meson.build b/src/system-update-generator/meson.build
new file mode 100644 (file)
index 0000000..cc62919
--- /dev/null
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+executables += [
+        generator_template + {
+                'name' : 'systemd-system-update-generator',
+                'sources' : files('system-update-generator.c'),
+        },
+]