summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meson.build58
-rw-r--r--src/binfmt/meson.build19
-rw-r--r--src/oom/meson.build16
-rw-r--r--src/pstore/meson.build15
4 files changed, 49 insertions, 59 deletions
diff --git a/meson.build b/meson.build
index d200b422fb..898f3d4b46 100644
--- a/meson.build
+++ b/meson.build
@@ -2372,6 +2372,7 @@ subdir('src/libsystemd-network')
subdir('src/analyze')
subdir('src/backlight')
+subdir('src/binfmt')
subdir('src/boot')
subdir('src/boot/efi')
subdir('src/busctl')
@@ -2581,63 +2582,6 @@ meson.add_install_script(meson_make_symlink,
bindir / 'udevadm',
libexecdir / 'systemd-udevd')
-if conf.get('ENABLE_PSTORE') == 1
- executable(
- 'systemd-pstore',
- systemd_pstore_sources,
- include_directories : includes,
- link_with : [libshared],
- dependencies : [libacl,
- liblz4,
- libxz,
- libzstd,
- threads,
- userspace],
- install_rpath : pkglibdir,
- install : true,
- install_dir : libexecdir)
-endif
-
-if conf.get('ENABLE_OOMD') == 1
- dbus_programs += executable('systemd-oomd',
- systemd_oomd_sources,
- include_directories : includes,
- link_with : [libshared],
- dependencies : [libatomic,
- userspace],
- install_rpath : pkglibdir,
- install : true,
- install_dir : libexecdir)
-
- public_programs += executable(
- 'oomctl',
- oomctl_sources,
- include_directories : includes,
- link_with : [libshared],
- dependencies : [userspace],
- install_rpath : pkglibdir,
- install : true)
-endif
-
-if conf.get('ENABLE_BINFMT') == 1
- public_programs += executable(
- 'systemd-binfmt',
- 'src/binfmt/binfmt.c',
- include_directories : includes,
- link_with : [libshared],
- dependencies : [userspace],
- install_rpath : pkglibdir,
- install : true,
- install_dir : libexecdir)
-
- meson.add_install_script('sh', '-c',
- mkdir_p.format(binfmtdir))
- if install_sysconfdir
- meson.add_install_script('sh', '-c',
- mkdir_p.format(sysconfdir / 'binfmt.d'))
- endif
-endif
-
if conf.get('ENABLE_SYSUPDATE') == 1
exe = executable(
'systemd-sysupdate',
diff --git a/src/binfmt/meson.build b/src/binfmt/meson.build
new file mode 100644
index 0000000000..e33f81aaa0
--- /dev/null
+++ b/src/binfmt/meson.build
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+executables += [
+ libexec_template + {
+ 'name' : 'systemd-binfmt',
+ 'public' : true,
+ 'conditions' : ['ENABLE_BINFMT'],
+ 'sources' : files('binfmt.c'),
+ },
+]
+
+if conf.get('ENABLE_BINFMT') == 1
+ meson.add_install_script('sh', '-c',
+ mkdir_p.format(binfmtdir))
+ if install_sysconfdir
+ meson.add_install_script('sh', '-c',
+ mkdir_p.format(sysconfdir / 'binfmt.d'))
+ endif
+endif
diff --git a/src/oom/meson.build b/src/oom/meson.build
index 8d31f05c98..b475fbf12c 100644
--- a/src/oom/meson.build
+++ b/src/oom/meson.build
@@ -7,7 +7,21 @@ systemd_oomd_sources = files(
'oomd.c',
)
-oomctl_sources = files('oomctl.c')
+executables += [
+ libexec_template + {
+ 'name' : 'systemd-oomd',
+ 'dbus' : true,
+ 'conditions' : ['ENABLE_OOMD'],
+ 'sources' : systemd_oomd_sources,
+ 'dependencies' : libatomic,
+ },
+ executable_template + {
+ 'name' : 'oomctl',
+ 'public' : true,
+ 'conditions' : ['ENABLE_OOMD'],
+ 'sources' : files('oomctl.c'),
+ },
+]
if conf.get('ENABLE_OOMD') == 1
install_data('org.freedesktop.oom1.conf',
diff --git a/src/pstore/meson.build b/src/pstore/meson.build
index 76b656a4b8..122ba2ee3e 100644
--- a/src/pstore/meson.build
+++ b/src/pstore/meson.build
@@ -1,6 +1,19 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
-systemd_pstore_sources = files('pstore.c')
+executables += [
+ libexec_template + {
+ 'name' : 'systemd-pstore',
+ 'conditions' : ['ENABLE_PSTORE'],
+ 'sources' : files('pstore.c'),
+ 'dependencies' : [
+ libacl,
+ liblz4,
+ libxz,
+ libzstd,
+ threads,
+ ],
+ },
+]
if conf.get('ENABLE_PSTORE') == 1 and install_sysconfdir_samples
install_data('pstore.conf',