mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
meson: allow building .standalone on demand
We can always build the standalone version whenever we build the normal version (the dependencies are the same). In most builds standalone binaries would be disabled. But it is occasionally useful to have them for testing, so move the conditional to install:, so the binaries can be build by giving the explicit target name. The default of 'build_by_default' for executable() is sadly true (since meson 0.38.0), so need to specify build_by_default: too. Also add systemd-shutdown.standalone to public_programs for additional testing.
This commit is contained in:
parent
9a01fe3906
commit
b62ee354dd
125
meson.build
125
meson.build
|
@ -4008,20 +4008,21 @@ if enable_sysusers
|
|||
args : exe.full_path())
|
||||
endif
|
||||
|
||||
exe = executable(
|
||||
'systemd-sysusers.standalone',
|
||||
'src/sysusers/sysusers.c',
|
||||
include_directories : includes,
|
||||
c_args : '-DSTANDALONE',
|
||||
link_with : [libshared_static,
|
||||
libbasic,
|
||||
libbasic_gcrypt,
|
||||
libsystemd_static],
|
||||
dependencies : [userspace,
|
||||
versiondep],
|
||||
build_by_default: have_standalone_binaries,
|
||||
install : have_standalone_binaries,
|
||||
install_dir : rootbindir)
|
||||
if have_standalone_binaries
|
||||
exe = executable(
|
||||
'systemd-sysusers.standalone',
|
||||
'src/sysusers/sysusers.c',
|
||||
include_directories : includes,
|
||||
c_args : '-DSTANDALONE',
|
||||
link_with : [libshared_static,
|
||||
libbasic,
|
||||
libbasic_gcrypt,
|
||||
libsystemd_static],
|
||||
dependencies : [userspace,
|
||||
versiondep],
|
||||
install : true,
|
||||
install_dir : rootbindir)
|
||||
public_programs += exe
|
||||
|
||||
if want_tests != 'false'
|
||||
|
@ -4054,21 +4055,22 @@ if conf.get('ENABLE_TMPFILES') == 1
|
|||
args : exe.full_path())
|
||||
endif
|
||||
|
||||
exe = executable(
|
||||
'systemd-tmpfiles.standalone',
|
||||
systemd_tmpfiles_sources,
|
||||
include_directories : includes,
|
||||
c_args : '-DSTANDALONE',
|
||||
link_with : [libshared_static,
|
||||
libbasic,
|
||||
libbasic_gcrypt,
|
||||
libsystemd_static],
|
||||
dependencies : [libacl,
|
||||
userspace,
|
||||
versiondep],
|
||||
build_by_default: have_standalone_binaries,
|
||||
install : have_standalone_binaries,
|
||||
install_dir : rootbindir)
|
||||
if have_standalone_binaries
|
||||
exe = executable(
|
||||
'systemd-tmpfiles.standalone',
|
||||
systemd_tmpfiles_sources,
|
||||
include_directories : includes,
|
||||
c_args : '-DSTANDALONE',
|
||||
link_with : [libshared_static,
|
||||
libbasic,
|
||||
libbasic_gcrypt,
|
||||
libsystemd_static],
|
||||
dependencies : [libacl,
|
||||
userspace,
|
||||
versiondep],
|
||||
install : true,
|
||||
install_dir : rootbindir)
|
||||
public_programs += exe
|
||||
|
||||
if want_tests != 'false'
|
||||
|
@ -4168,26 +4170,27 @@ if conf.get('ENABLE_REPART') == 1
|
|||
install_dir : rootbindir)
|
||||
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,
|
||||
versiondep],
|
||||
build_by_default: have_standalone_binaries,
|
||||
install_rpath : rootpkglibdir,
|
||||
install : have_standalone_binaries,
|
||||
install_dir : rootbindir)
|
||||
if have_standalone_binaries
|
||||
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,
|
||||
versiondep],
|
||||
install_rpath : rootpkglibdir,
|
||||
install : true,
|
||||
install_dir : rootbindir)
|
||||
public_programs += exe
|
||||
endif
|
||||
endif
|
||||
|
@ -4204,21 +4207,23 @@ executable(
|
|||
install : true,
|
||||
install_dir : rootlibexecdir)
|
||||
|
||||
executable(
|
||||
'systemd-shutdown.standalone',
|
||||
systemd_shutdown_sources,
|
||||
include_directories : includes,
|
||||
c_args : '-DSTANDALONE',
|
||||
link_with : [libshared_static,
|
||||
libbasic,
|
||||
libsystemd_static],
|
||||
dependencies : [libmount,
|
||||
userspace,
|
||||
versiondep],
|
||||
build_by_default: have_standalone_binaries,
|
||||
install_rpath : rootpkglibdir,
|
||||
install : have_standalone_binaries,
|
||||
install_dir : rootlibexecdir)
|
||||
if have_standalone_binaries
|
||||
executable(
|
||||
'systemd-shutdown.standalone',
|
||||
systemd_shutdown_sources,
|
||||
include_directories : includes,
|
||||
c_args : '-DSTANDALONE',
|
||||
link_with : [libshared_static,
|
||||
libbasic,
|
||||
libsystemd_static],
|
||||
dependencies : [libmount,
|
||||
userspace,
|
||||
versiondep],
|
||||
install_rpath : rootpkglibdir,
|
||||
install : true,
|
||||
install_dir : rootlibexecdir)
|
||||
public_programs += exe
|
||||
endif
|
||||
|
||||
executable(
|
||||
|
|
Loading…
Reference in a new issue