]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: move declarations of pstore, oomd, and binfmt
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 25 Jun 2023 07:10:00 +0000 (16:10 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Aug 2023 06:54:45 +0000 (15:54 +0900)
meson.build
src/binfmt/meson.build [new file with mode: 0644]
src/oom/meson.build
src/pstore/meson.build

index d200b422fb9549a1d1224c7933bc9e1dff770b65..898f3d4b462c1bf4767ad11b503ccaa6ac90e542 100644 (file)
@@ -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 (file)
index 0000000..e33f81a
--- /dev/null
@@ -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
index 8d31f05c9849e5771ed7b528ae9c2f0df02b6192..b475fbf12c88e2121d203714428d96e5dd2e0601 100644 (file)
@@ -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',
index 76b656a4b8ab291c28781656a7357d2b02503550..122ba2ee3ee3a13cee3d7ec3b7182adab9b57ea7 100644 (file)
@@ -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',