diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-03-05 16:19:40 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-03-05 21:01:17 +0100 |
commit | 53f79e125d5614d899bc3489d00850ddf66c45d7 (patch) | |
tree | 582eaf7bd90b065a477542ad8ba61f984cc98e6a /src/core/meson.build | |
parent | bea3d64a73bb9313feed01b6ba9038dab04b9953 (diff) | |
download | systemd-53f79e125d5614d899bc3489d00850ddf66c45d7.tar.gz |
meson: use a convenience library for the sources shared between core/ and the outside
This avoids double compilation. Those files are tiny, so it doesn't save time,
but we avoid repeated warnings and errors, and it's generally cleaner to it
this way.
The number of commands in 'ninja -C build clean && ninja -C build' drops from
1462 to 1455 for me.
Diffstat (limited to 'src/core/meson.build')
-rw-r--r-- | src/core/meson.build | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/core/meson.build b/src/core/meson.build index 6f387c4796..2e58146d1f 100644 --- a/src/core/meson.build +++ b/src/core/meson.build @@ -1,5 +1,16 @@ # SPDX-License-Identifier: LGPL-2.1+ +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_la_sources = ''' audit-fd.c audit-fd.h @@ -69,8 +80,6 @@ libcore_la_sources = ''' job.h kill.c kill.h - killall.c - killall.h kmod-setup.c kmod-setup.h load-dropin.c @@ -79,14 +88,8 @@ libcore_la_sources = ''' load-fragment.h locale-setup.c locale-setup.h - loopback-setup.c - loopback-setup.h - machine-id-setup.c - machine-id-setup.h manager.c manager.h - mount-setup.c - mount-setup.h mount.c mount.h namespace.c @@ -144,12 +147,22 @@ load_fragment_gperf_nulstr_c = custom_target( command : [awk, '-f', '@INPUT0@', '@INPUT1@'], 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( 'core', libcore_la_sources, load_fragment_gperf_c, load_fragment_gperf_nulstr_c, include_directories : includes, + link_whole : libcore_shared, dependencies : [versiondep, threads, librt, |