meson: move declarations of repart and friends

This commit is contained in:
Yu Watanabe 2023-06-25 16:23:40 +09:00
parent df490fc79b
commit 0d6b90b95e
2 changed files with 48 additions and 60 deletions

View 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,

View 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,
},
]