From: Yu Watanabe Date: Sun, 25 Jun 2023 07:23:40 +0000 (+0900) Subject: meson: move declarations of repart and friends X-Git-Tag: v255-rc1~854^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0d6b90b95e05f322854ffdfffc7158e3fad5c693;p=thirdparty%2Fsystemd.git meson: move declarations of repart and friends --- diff --git a/meson.build b/meson.build index f3319d34512..257b591ff7d 100644 --- a/meson.build +++ b/meson.build @@ -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, diff --git a/src/partition/meson.build b/src/partition/meson.build index a7a6c293792..19f49f606e5 100644 --- a/src/partition/meson.build +++ b/src/partition/meson.build @@ -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, + }, +]