mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
meson: slightly disentangle code dependencies
But, still sd-id128 is used in src/basic.
This commit is contained in:
parent
b61016f207
commit
8d40961c3c
66
meson.build
66
meson.build
@ -1616,32 +1616,23 @@ public_programs = []
|
||||
tests = []
|
||||
fuzzers = []
|
||||
|
||||
includes = include_directories('src/basic',
|
||||
'src/boot',
|
||||
'src/core',
|
||||
'src/home',
|
||||
'src/journal',
|
||||
'src/journal-remote',
|
||||
'src/libsystemd-network',
|
||||
'src/libsystemd/sd-bus',
|
||||
'src/libsystemd/sd-device',
|
||||
'src/libsystemd/sd-event',
|
||||
'src/libsystemd/sd-hwdb',
|
||||
'src/libsystemd/sd-id128',
|
||||
'src/libsystemd/sd-journal',
|
||||
'src/libsystemd/sd-netlink',
|
||||
'src/libsystemd/sd-network',
|
||||
'src/libsystemd/sd-resolve',
|
||||
'src/login',
|
||||
'src/nspawn',
|
||||
'src/resolve',
|
||||
'src/shared',
|
||||
'src/shutdown',
|
||||
'src/systemd',
|
||||
'src/timesync',
|
||||
'src/udev',
|
||||
'src/xdg-autostart-generator',
|
||||
'.')
|
||||
basic_includes = include_directories(
|
||||
'src/basic',
|
||||
'src/systemd',
|
||||
'.')
|
||||
|
||||
libsystemd_includes = [basic_includes, include_directories(
|
||||
'src/libsystemd/sd-bus',
|
||||
'src/libsystemd/sd-device',
|
||||
'src/libsystemd/sd-event',
|
||||
'src/libsystemd/sd-hwdb',
|
||||
'src/libsystemd/sd-id128',
|
||||
'src/libsystemd/sd-journal',
|
||||
'src/libsystemd/sd-netlink',
|
||||
'src/libsystemd/sd-network',
|
||||
'src/libsystemd/sd-resolve')]
|
||||
|
||||
includes = [libsystemd_includes, include_directories('src/shared')]
|
||||
|
||||
subdir('po')
|
||||
subdir('catalog')
|
||||
@ -1656,7 +1647,7 @@ libsystemd = shared_library(
|
||||
'systemd',
|
||||
disable_mempool_c,
|
||||
version : libsystemd_version,
|
||||
include_directories : includes,
|
||||
include_directories : libsystemd_includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + libsystemd_sym_path],
|
||||
link_with : [libbasic,
|
||||
@ -1680,7 +1671,7 @@ install_libsystemd_static = static_library(
|
||||
basic_sources,
|
||||
basic_gcrypt_sources,
|
||||
disable_mempool_c,
|
||||
include_directories : includes,
|
||||
include_directories : libsystemd_includes,
|
||||
build_by_default : static_libsystemd != 'false',
|
||||
install : static_libsystemd != 'false',
|
||||
install_dir : rootlibdir,
|
||||
@ -1789,7 +1780,7 @@ test_dlopen = executable(
|
||||
foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
|
||||
['systemd', 'ENABLE_NSS_SYSTEMD', ['nss-systemd.h', 'userdb-glue.c', 'userdb-glue.h']],
|
||||
['mymachines', 'ENABLE_NSS_MYMACHINES'],
|
||||
['resolve', 'ENABLE_NSS_RESOLVE']]
|
||||
['resolve', 'ENABLE_NSS_RESOLVE', [], resolve_includes]]
|
||||
|
||||
condition = tuple[1] == '' or conf.get(tuple[1]) == 1
|
||||
if condition
|
||||
@ -1805,12 +1796,14 @@ foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
|
||||
endforeach
|
||||
endif
|
||||
|
||||
incs = tuple.length() > 3 ? tuple[3] : includes
|
||||
|
||||
nss = shared_library(
|
||||
'nss_' + module,
|
||||
sources,
|
||||
disable_mempool_c,
|
||||
version : '2',
|
||||
include_directories : includes,
|
||||
include_directories : incs,
|
||||
# Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned
|
||||
link_args : ['-Wl,-z,nodelete',
|
||||
'-shared',
|
||||
@ -1865,7 +1858,7 @@ meson.add_install_script(meson_make_symlink,
|
||||
public_programs += executable(
|
||||
'systemd-analyze',
|
||||
systemd_analyze_sources,
|
||||
include_directories : includes,
|
||||
include_directories : core_includes,
|
||||
link_with : [libcore,
|
||||
libshared],
|
||||
dependencies : [versiondep,
|
||||
@ -2013,7 +2006,7 @@ if conf.get('ENABLE_RESOLVE') == 1
|
||||
executable(
|
||||
'systemd-resolved',
|
||||
systemd_resolved_sources,
|
||||
include_directories : includes,
|
||||
include_directories : resolve_includes,
|
||||
link_with : [libshared,
|
||||
libbasic_gcrypt,
|
||||
libsystemd_resolve_core],
|
||||
@ -2265,7 +2258,7 @@ if conf.get('ENABLE_HOMED') == 1
|
||||
executable(
|
||||
'systemd-homed',
|
||||
systemd_homed_sources,
|
||||
include_directories : includes,
|
||||
include_directories : home_includes,
|
||||
link_with : [libshared],
|
||||
dependencies : [threads,
|
||||
libcrypt,
|
||||
@ -3236,7 +3229,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
||||
executable(
|
||||
'systemd-networkd',
|
||||
systemd_networkd_sources,
|
||||
include_directories : network_include_dir,
|
||||
include_directories : network_includes,
|
||||
link_with : [libnetworkd_core,
|
||||
libsystemd_network,
|
||||
networkd_link_with],
|
||||
@ -3249,8 +3242,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
||||
'systemd-networkd-wait-online',
|
||||
systemd_networkd_wait_online_sources,
|
||||
include_directories : includes,
|
||||
link_with : [libnetworkd_core,
|
||||
networkd_link_with],
|
||||
link_with : [networkd_link_with],
|
||||
install_rpath : rootlibexecdir,
|
||||
install : true,
|
||||
install_dir : rootlibexecdir)
|
||||
@ -3258,7 +3250,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
||||
public_programs += executable(
|
||||
'networkctl',
|
||||
networkctl_sources,
|
||||
include_directories : includes,
|
||||
include_directories : libsystemd_network_includes,
|
||||
link_with : [libsystemd_network,
|
||||
networkd_link_with],
|
||||
install_rpath : rootlibexecdir,
|
||||
|
@ -381,7 +381,7 @@ run_target(
|
||||
libbasic = static_library(
|
||||
'basic',
|
||||
basic_sources,
|
||||
include_directories : includes,
|
||||
include_directories : basic_includes,
|
||||
dependencies : [versiondep,
|
||||
threads,
|
||||
libcap,
|
||||
@ -403,6 +403,6 @@ basic_gcrypt_sources = files(
|
||||
libbasic_gcrypt = static_library(
|
||||
'basic-gcrypt',
|
||||
basic_gcrypt_sources,
|
||||
include_directories : includes,
|
||||
include_directories : basic_includes,
|
||||
dependencies : [libgcrypt],
|
||||
c_args : ['-fvisibility=default'])
|
||||
|
@ -158,6 +158,8 @@ libcore = static_library(
|
||||
libmount,
|
||||
libacl])
|
||||
|
||||
core_includes = [includes, include_directories('.')]
|
||||
|
||||
systemd_sources = files('main.c')
|
||||
|
||||
in_files = [['macros.systemd', rpmmacrosdir],
|
||||
|
@ -1,5 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
home_includes = [includes, include_directories('.')]
|
||||
|
||||
systemd_homework_sources = files('''
|
||||
home-util.c
|
||||
home-util.h
|
||||
|
@ -24,7 +24,7 @@ endif
|
||||
libsystemd_journal_remote = static_library(
|
||||
'systemd-journal-remote',
|
||||
libsystemd_journal_remote_sources,
|
||||
include_directories : includes,
|
||||
include_directories : journal_includes,
|
||||
dependencies : [threads,
|
||||
libmicrohttpd,
|
||||
libgnutls,
|
||||
|
@ -35,6 +35,8 @@ libjournal_core = static_library(
|
||||
include_directories : includes,
|
||||
install : false)
|
||||
|
||||
journal_includes = [includes, include_directories('.')]
|
||||
|
||||
systemd_journald_sources = files('''
|
||||
journald.c
|
||||
journald-server.h
|
||||
|
@ -47,3 +47,5 @@ libsystemd_network = static_library(
|
||||
'systemd-network',
|
||||
sources,
|
||||
include_directories : includes)
|
||||
|
||||
libsystemd_network_includes = [includes, include_directories('.')]
|
||||
|
@ -164,7 +164,7 @@ libsystemd_static = static_library(
|
||||
'systemd_static',
|
||||
libsystemd_sources,
|
||||
install : false,
|
||||
include_directories : includes,
|
||||
include_directories : libsystemd_includes,
|
||||
link_with : libbasic,
|
||||
dependencies : [threads,
|
||||
librt],
|
||||
|
@ -207,12 +207,12 @@ else
|
||||
libbasic_gcrypt]
|
||||
endif
|
||||
|
||||
network_include_dir = [includes, include_directories(['.', 'netdev', 'tc'])]
|
||||
network_includes = [libsystemd_network_includes, include_directories(['.', 'netdev', 'tc'])]
|
||||
|
||||
libnetworkd_core = static_library(
|
||||
'networkd-core',
|
||||
sources,
|
||||
include_directories : network_include_dir,
|
||||
include_directories : network_includes,
|
||||
link_with : [networkd_link_with])
|
||||
|
||||
if conf.get('ENABLE_NETWORKD') == 1
|
||||
@ -243,14 +243,14 @@ fuzzers += [
|
||||
libsystemd_network,
|
||||
networkd_link_with],
|
||||
[threads],
|
||||
network_include_dir],
|
||||
network_includes],
|
||||
|
||||
[['src/network/fuzz-network-parser.c'],
|
||||
[libnetworkd_core,
|
||||
libsystemd_network,
|
||||
networkd_link_with],
|
||||
[threads],
|
||||
network_include_dir],
|
||||
network_includes],
|
||||
]
|
||||
|
||||
tests += [
|
||||
@ -258,19 +258,19 @@ tests += [
|
||||
[libnetworkd_core,
|
||||
libsystemd_network],
|
||||
[],
|
||||
network_include_dir],
|
||||
network_includes],
|
||||
|
||||
[['src/network/test-network.c'],
|
||||
[libnetworkd_core,
|
||||
libsystemd_network],
|
||||
[threads],
|
||||
network_include_dir],
|
||||
network_includes],
|
||||
|
||||
[['src/network/test-network-tables.c'],
|
||||
[libnetworkd_core,
|
||||
libsystemd_network],
|
||||
[threads],
|
||||
network_include_dir],
|
||||
network_includes],
|
||||
|
||||
[['src/network/generator/test-network-generator.c',
|
||||
'src/network/generator/network-generator.c',
|
||||
|
@ -1,5 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
resolve_includes = [includes, include_directories('.')]
|
||||
|
||||
basic_dns_sources = files('''
|
||||
resolved-dns-dnssec.c
|
||||
resolved-dns-dnssec.h
|
||||
@ -206,5 +208,5 @@ tests += [
|
||||
|
||||
[['src/resolve/test-dnssec-complex.c',
|
||||
'src/resolve/dns-type.c'],
|
||||
[], [], [], '', 'manual'],
|
||||
[], [], resolve_includes, '', 'manual'],
|
||||
]
|
||||
|
@ -52,15 +52,20 @@ tests += [
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-emergency-action.c'],
|
||||
[libcore,
|
||||
libshared]],
|
||||
libshared],
|
||||
[],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-chown-rec.c'],
|
||||
[libcore,
|
||||
libshared]],
|
||||
libshared],
|
||||
[],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-dlopen-so.c']],
|
||||
|
||||
@ -72,7 +77,8 @@ tests += [
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-ns.c'],
|
||||
[libcore,
|
||||
@ -83,7 +89,7 @@ tests += [
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid],
|
||||
[], '', 'manual'],
|
||||
core_includes, '', 'manual'],
|
||||
|
||||
[['src/test/test-loopback.c'],
|
||||
[libcore,
|
||||
@ -93,11 +99,10 @@ tests += [
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-dns-domain.c'],
|
||||
[libcore,
|
||||
libshared]],
|
||||
[['src/test/test-dns-domain.c']],
|
||||
|
||||
[['src/test/test-boot-timestamps.c'],
|
||||
[], [], [], 'ENABLE_EFI'],
|
||||
@ -112,7 +117,8 @@ tests += [
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-load-fragment.c'],
|
||||
[libcore,
|
||||
@ -122,7 +128,8 @@ tests += [
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-serialize.c']],
|
||||
|
||||
@ -258,7 +265,8 @@ tests += [
|
||||
[libcore,
|
||||
libshared],
|
||||
[threads,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-verbs.c']],
|
||||
|
||||
@ -284,7 +292,7 @@ tests += [
|
||||
libshared],
|
||||
[threads,
|
||||
libblkid],
|
||||
[], '', '', [], false],
|
||||
core_includes, '', '', [], false],
|
||||
|
||||
[['src/test/test-selinux.c']],
|
||||
|
||||
@ -299,7 +307,8 @@ tests += [
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-bpf-firewall.c'],
|
||||
[libcore,
|
||||
@ -309,7 +318,8 @@ tests += [
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-watch-pid.c'],
|
||||
[libcore,
|
||||
@ -319,7 +329,8 @@ tests += [
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-hashmap.c',
|
||||
'src/test/test-hashmap-plain.c',
|
||||
@ -345,10 +356,7 @@ tests += [
|
||||
|
||||
[['src/test/test-unaligned.c']],
|
||||
|
||||
[['src/test/test-tables.c',
|
||||
'src/shared/test-tables.h',
|
||||
'src/journal/journald-server.c',
|
||||
'src/journal/journald-server.h'],
|
||||
[['src/test/test-tables.c'],
|
||||
[libcore,
|
||||
libjournal_core,
|
||||
libudevd_core,
|
||||
@ -359,7 +367,7 @@ tests += [
|
||||
libxz,
|
||||
liblz4,
|
||||
libblkid],
|
||||
libudevd_core_includes],
|
||||
[core_includes, journal_includes, udev_includes]],
|
||||
|
||||
[['src/test/test-prioq.c']],
|
||||
|
||||
@ -406,11 +414,15 @@ tests += [
|
||||
|
||||
[['src/test/test-cgroup-cpu.c'],
|
||||
[libcore,
|
||||
libshared]],
|
||||
libshared],
|
||||
[],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-cgroup-unit-default.c'],
|
||||
[libcore,
|
||||
libshared]],
|
||||
libshared],
|
||||
[],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-cgroup-mask.c'],
|
||||
[libcore,
|
||||
@ -420,7 +432,8 @@ tests += [
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-varlink.c'],
|
||||
[],
|
||||
@ -454,7 +467,7 @@ tests += [
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid],
|
||||
[], '', 'timeout=120'],
|
||||
core_includes, '', 'timeout=120'],
|
||||
|
||||
[['src/test/test-execute.c'],
|
||||
[libcore,
|
||||
@ -465,7 +478,7 @@ tests += [
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid],
|
||||
[], '', 'timeout=360'],
|
||||
core_includes, '', 'timeout=360'],
|
||||
|
||||
[['src/test/test-siphash24.c']],
|
||||
|
||||
@ -474,7 +487,8 @@ tests += [
|
||||
[['src/test/test-install.c'],
|
||||
[libcore,
|
||||
libshared],
|
||||
[], [], '', 'manual'],
|
||||
[],
|
||||
core_includes, '', 'manual'],
|
||||
|
||||
[['src/test/test-watchdog.c']],
|
||||
|
||||
@ -486,7 +500,8 @@ tests += [
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
libblkid],
|
||||
core_includes],
|
||||
|
||||
[['src/test/test-conf-files.c']],
|
||||
|
||||
@ -516,7 +531,7 @@ tests += [
|
||||
libkmod,
|
||||
libacl,
|
||||
libselinux],
|
||||
[], '', 'manual', '-DLOG_REALM=LOG_REALM_UDEV'],
|
||||
udev_includes, '', 'manual', '-DLOG_REALM=LOG_REALM_UDEV'],
|
||||
|
||||
[['src/test/test-udev-util.c']],
|
||||
|
||||
@ -547,15 +562,7 @@ tests += [
|
||||
[libdl]],
|
||||
|
||||
[['src/test/test-nscd-flush.c'],
|
||||
[libcore,
|
||||
libshared],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid],
|
||||
[], 'ENABLE_NSCD', 'manual'],
|
||||
[], [], [], 'ENABLE_NSCD', 'manual'],
|
||||
]
|
||||
|
||||
############################################################
|
||||
@ -861,7 +868,9 @@ tests += [
|
||||
|
||||
[['src/analyze/test-verify.c', 'src/analyze/analyze-verify.c', 'src/analyze/analyze-verify.h'],
|
||||
[libcore,
|
||||
libshared]],
|
||||
libshared],
|
||||
[],
|
||||
core_includes],
|
||||
|
||||
[['src/login/test-inhibit.c'],
|
||||
[], [], [], '', 'manual'],
|
||||
|
@ -105,13 +105,13 @@ endif
|
||||
|
||||
############################################################
|
||||
|
||||
libudevd_core_includes = [includes, include_directories('net')]
|
||||
udev_includes = [includes, include_directories('net', '.')]
|
||||
libudevd_core = static_library(
|
||||
'udev-core',
|
||||
libudevd_core_sources,
|
||||
link_config_gperf_c,
|
||||
keyboard_keys_from_name_h,
|
||||
include_directories : libudevd_core_includes,
|
||||
include_directories : udev_includes,
|
||||
c_args : ['-DLOG_REALM=LOG_REALM_UDEV'],
|
||||
link_with : udev_link_with,
|
||||
dependencies : [libblkid, libkmod])
|
||||
@ -177,7 +177,8 @@ fuzzers += [
|
||||
[libudevd_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libacl]],
|
||||
libacl],
|
||||
udev_includes],
|
||||
|
||||
[['src/udev/fido_id/fuzz-fido-id-desc.c',
|
||||
'src/udev/fido_id/fido_id_desc.c']],
|
||||
|
Loading…
Reference in New Issue
Block a user