Merge pull request #11898 from keszybz/meson-conv-lib
Use a convenience library for the sources shared between core/ and shutdown/
This commit is contained in:
commit
c03f9cec42
28
meson.build
28
meson.build
|
@ -1715,9 +1715,9 @@ executable('systemd-run-generator',
|
||||||
|
|
||||||
executable('systemd-fstab-generator',
|
executable('systemd-fstab-generator',
|
||||||
'src/fstab-generator/fstab-generator.c',
|
'src/fstab-generator/fstab-generator.c',
|
||||||
'src/core/mount-setup.c',
|
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libcore_shared,
|
||||||
|
libshared],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : systemgeneratordir)
|
install_dir : systemgeneratordir)
|
||||||
|
@ -2355,20 +2355,18 @@ endif
|
||||||
|
|
||||||
executable('systemd-remount-fs',
|
executable('systemd-remount-fs',
|
||||||
'src/remount-fs/remount-fs.c',
|
'src/remount-fs/remount-fs.c',
|
||||||
'src/core/mount-setup.c',
|
|
||||||
'src/core/mount-setup.h',
|
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libcore_shared,
|
||||||
|
libshared],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibexecdir)
|
install_dir : rootlibexecdir)
|
||||||
|
|
||||||
executable('systemd-machine-id-setup',
|
executable('systemd-machine-id-setup',
|
||||||
'src/machine-id-setup/machine-id-setup-main.c',
|
'src/machine-id-setup/machine-id-setup-main.c',
|
||||||
'src/core/machine-id-setup.c',
|
|
||||||
'src/core/machine-id-setup.h',
|
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libcore_shared,
|
||||||
|
libshared],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootbindir)
|
install_dir : rootbindir)
|
||||||
|
@ -2680,12 +2678,9 @@ public_programs += exe
|
||||||
|
|
||||||
executable('systemd-shutdown',
|
executable('systemd-shutdown',
|
||||||
systemd_shutdown_sources,
|
systemd_shutdown_sources,
|
||||||
'src/core/mount-setup.c',
|
|
||||||
'src/core/mount-setup.h',
|
|
||||||
'src/core/killall.c',
|
|
||||||
'src/core/killall.h',
|
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libshared],
|
link_with : [libcore_shared,
|
||||||
|
libshared],
|
||||||
dependencies : [libmount],
|
dependencies : [libmount],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
|
@ -2726,12 +2721,9 @@ endif
|
||||||
|
|
||||||
exe = executable('systemd-nspawn',
|
exe = executable('systemd-nspawn',
|
||||||
systemd_nspawn_sources,
|
systemd_nspawn_sources,
|
||||||
'src/core/mount-setup.c', # FIXME: use a variable?
|
|
||||||
'src/core/mount-setup.h',
|
|
||||||
'src/core/loopback-setup.c',
|
|
||||||
'src/core/loopback-setup.h',
|
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libnspawn_core,
|
link_with : [libcore_shared,
|
||||||
|
libnspawn_core,
|
||||||
libshared],
|
libshared],
|
||||||
dependencies : [libblkid],
|
dependencies : [libblkid],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
|
|
|
@ -1,6 +1,17 @@
|
||||||
# SPDX-License-Identifier: LGPL-2.1+
|
# SPDX-License-Identifier: LGPL-2.1+
|
||||||
|
|
||||||
libcore_la_sources = '''
|
libcore_shared_sources = '''
|
||||||
|
killall.c
|
||||||
|
killall.h
|
||||||
|
loopback-setup.c
|
||||||
|
loopback-setup.h
|
||||||
|
machine-id-setup.c
|
||||||
|
machine-id-setup.h
|
||||||
|
mount-setup.c
|
||||||
|
mount-setup.h
|
||||||
|
'''.split()
|
||||||
|
|
||||||
|
libcore_sources = '''
|
||||||
audit-fd.c
|
audit-fd.c
|
||||||
audit-fd.h
|
audit-fd.h
|
||||||
automount.c
|
automount.c
|
||||||
|
@ -69,8 +80,6 @@ libcore_la_sources = '''
|
||||||
job.h
|
job.h
|
||||||
kill.c
|
kill.c
|
||||||
kill.h
|
kill.h
|
||||||
killall.c
|
|
||||||
killall.h
|
|
||||||
kmod-setup.c
|
kmod-setup.c
|
||||||
kmod-setup.h
|
kmod-setup.h
|
||||||
load-dropin.c
|
load-dropin.c
|
||||||
|
@ -79,14 +88,8 @@ libcore_la_sources = '''
|
||||||
load-fragment.h
|
load-fragment.h
|
||||||
locale-setup.c
|
locale-setup.c
|
||||||
locale-setup.h
|
locale-setup.h
|
||||||
loopback-setup.c
|
|
||||||
loopback-setup.h
|
|
||||||
machine-id-setup.c
|
|
||||||
machine-id-setup.h
|
|
||||||
manager.c
|
manager.c
|
||||||
manager.h
|
manager.h
|
||||||
mount-setup.c
|
|
||||||
mount-setup.h
|
|
||||||
mount.c
|
mount.c
|
||||||
mount.h
|
mount.h
|
||||||
namespace.c
|
namespace.c
|
||||||
|
@ -144,12 +147,22 @@ load_fragment_gperf_nulstr_c = custom_target(
|
||||||
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||||
capture : true)
|
capture : true)
|
||||||
|
|
||||||
|
# A convenience library to share code with other binaries:
|
||||||
|
# systemd-shutdown, systemd-remount-fs, systemd-machine-id-setup, …
|
||||||
|
libcore_shared = static_library(
|
||||||
|
'core-shared',
|
||||||
|
libcore_shared_sources,
|
||||||
|
include_directories : includes,
|
||||||
|
dependencies : [versiondep,
|
||||||
|
libmount])
|
||||||
|
|
||||||
libcore = static_library(
|
libcore = static_library(
|
||||||
'core',
|
'core',
|
||||||
libcore_la_sources,
|
libcore_sources,
|
||||||
load_fragment_gperf_c,
|
load_fragment_gperf_c,
|
||||||
load_fragment_gperf_nulstr_c,
|
load_fragment_gperf_nulstr_c,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
|
link_whole : libcore_shared,
|
||||||
dependencies : [versiondep,
|
dependencies : [versiondep,
|
||||||
threads,
|
threads,
|
||||||
librt,
|
librt,
|
||||||
|
|
|
@ -714,11 +714,10 @@ tests += [
|
||||||
'ENABLE_NSS', 'manual'],
|
'ENABLE_NSS', 'manual'],
|
||||||
|
|
||||||
[['src/test/test-umount.c',
|
[['src/test/test-umount.c',
|
||||||
'src/core/mount-setup.c',
|
|
||||||
'src/core/mount-setup.h',
|
|
||||||
'src/shutdown/umount.c',
|
'src/shutdown/umount.c',
|
||||||
'src/shutdown/umount.h'],
|
'src/shutdown/umount.h'],
|
||||||
[],
|
[libcore_shared,
|
||||||
|
libshared],
|
||||||
[libmount]],
|
[libmount]],
|
||||||
|
|
||||||
[['src/test/test-bus-util.c'],
|
[['src/test/test-bus-util.c'],
|
||||||
|
|
Loading…
Reference in a new issue