]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: move declarations of repart and friends
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 25 Jun 2023 07:23:40 +0000 (16:23 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Aug 2023 06:54:45 +0000 (15:54 +0900)
meson.build
src/partition/meson.build

index f3319d345128492cc5a2d98083e569f3db9d8f6c..257b591ff7d0e47119e3849e7b46ed80da004fbf 100644 (file)
@@ -2588,26 +2588,6 @@ meson.add_install_script(meson_make_symlink,
                          bindir / 'udevadm',
                          libexecdir / 'systemd-udevd')
 
-executable(
-        'systemd-growfs',
-        'src/partition/growfs.c',
-        include_directories : includes,
-        link_with : [libshared],
-        dependencies : [userspace],
-        install_rpath : pkglibdir,
-        install : true,
-        install_dir : libexecdir)
-
-executable(
-        'systemd-makefs',
-        'src/partition/makefs.c',
-        include_directories : includes,
-        link_with : [libshared],
-        dependencies : [userspace],
-        install_rpath : pkglibdir,
-        install : true,
-        install_dir : libexecdir)
-
 executable(
         'systemd-sleep',
         'src/sleep/sleep.c',
@@ -3004,45 +2984,6 @@ if want_tests != 'false'
              args : ['verify', '--resolve-names=never', all_rules])
 endif
 
-if conf.get('ENABLE_REPART') == 1
-        exe = executable(
-                'systemd-repart',
-                systemd_repart_sources,
-                include_directories : includes,
-                link_with : [libshared,
-                             libshared_fdisk],
-                dependencies : [libblkid,
-                                libfdisk,
-                                libopenssl,
-                                threads,
-                                userspace],
-                install_rpath : pkglibdir,
-                install : true)
-        public_programs += exe
-
-        exe = executable(
-                'systemd-repart.standalone',
-                systemd_repart_sources,
-                include_directories : includes,
-                c_args : '-DSTANDALONE',
-                link_with : [libshared_static,
-                             libbasic,
-                             libbasic_gcrypt,
-                             libsystemd_static,
-                             libshared_fdisk],
-                dependencies : [libblkid,
-                                libfdisk,
-                                libopenssl,
-                                threads,
-                                userspace],
-                build_by_default: have_standalone_binaries,
-                install_rpath : pkglibdir,
-                install : have_standalone_binaries)
-        if have_standalone_binaries
-                public_programs += exe
-        endif
-endif
-
 executable(
         'systemd-shutdown',
         systemd_shutdown_sources,
index a7a6c293792532c6245dacd3ab1efc66ecde28e5..19f49f606e5fcaf962ead8565fe18307c268e0b1 100644 (file)
@@ -1,3 +1,50 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-systemd_repart_sources = files('repart.c')
+executables += [
+        libexec_template + {
+                'name' : 'systemd-growfs',
+                'sources' : files('growfs.c'),
+        },
+        libexec_template + {
+                'name' : 'systemd-makefs',
+                'sources' : files('makefs.c'),
+        },
+        executable_template + {
+                'name' : 'systemd-repart',
+                'public' : true,
+                'conditions' : ['ENABLE_REPART'],
+                'sources' : files('repart.c'),
+                'link_with' : [
+                        libshared,
+                        libshared_fdisk,
+                ],
+                'dependencies' : [
+                        libblkid,
+                        libfdisk,
+                        libopenssl,
+                        threads,
+                ],
+        },
+        executable_template + {
+                'name' : 'systemd-repart.standalone',
+                'public' : have_standalone_binaries,
+                'conditions' : ['ENABLE_REPART'],
+                'sources' : files('repart.c'),
+                'c_args' : '-DSTANDALONE',
+                'link_with' : [
+                        libbasic,
+                        libbasic_gcrypt,
+                        libshared_fdisk,
+                        libshared_static,
+                        libsystemd_static,
+                ],
+                'dependencies' : [
+                        libblkid,
+                        libfdisk,
+                        libopenssl,
+                        threads,
+                ],
+                'build_by_default' : have_standalone_binaries,
+                'install' : have_standalone_binaries,
+        },
+]