From: Zbigniew Jędrzejewski-Szmek Date: Mon, 28 May 2018 08:37:11 +0000 (+0200) Subject: meson: use a convenience static library for nspawn core X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=374e03131279877934c5a919dcee4b8aae11cc16;p=elogind.git meson: use a convenience static library for nspawn core This makes it easier to link the nspawn implementation to the tests. Right now this just means that nspawn-patch-uid.c is not compiled twice, which is nice, but results in test-patch-uid being slightly bigger, which is not nice. But in general, we should use convenience libs to compile everything just once, as far as possible. Otherwise, once we start compiling a few files here twice, and a few file there thrice, we soon end up in a state where we are doing hundreds of extra compilations. So let's do the "right" thing, even if is might not be more efficient. --- diff --git a/meson.build b/meson.build index c8eff6dce..6691ca7fb 100644 --- a/meson.build +++ b/meson.build @@ -1429,6 +1429,7 @@ includes = include_directories('src/basic', 'src/systemd', #if 0 /// UNNEEDED by elogind # 'src/journal', +# 'src/nspawn', # 'src/resolve', # 'src/timesync', #endif // 0 @@ -1921,6 +1922,7 @@ executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', +executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', user_runtime_dir_sources, include_directories : includes, @@ -2746,12 +2748,10 @@ executable('elogind-cgroups-agent', # 'src/core/mount-setup.h', # 'src/core/loopback-setup.c', # 'src/core/loopback-setup.h', -# include_directories : [includes, include_directories('src/nspawn')], -# link_with : [libshared], -# dependencies : [libacl, -# libblkid, -# libseccomp, -# libselinux], +# include_directories : includes, +# link_with : [libnspawn_core, +# libshared], +# dependencies : [libblkid], # install_rpath : rootlibexecdir, # install : true) # public_programs += [exe]