diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-12-19 22:46:01 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-01-03 12:09:46 +0100 |
commit | 568a4ff8b18e58c09b72655a4a3c046a11da08cc (patch) | |
tree | 2f2f53cd5f47bc5b736939fa0e4e6ba87b37ddeb /src/resolve/meson.build | |
parent | 0c06b50662b94c6805c78193ac4d80875ae33668 (diff) | |
download | systemd-568a4ff8b18e58c09b72655a4a3c046a11da08cc.tar.gz systemd-568a4ff8b18e58c09b72655a4a3c046a11da08cc.tar.bz2 systemd-568a4ff8b18e58c09b72655a4a3c046a11da08cc.zip |
meson: use a convenience lib for shared resolve files
This reduces the man=false meson target count from 1281 to 1253.
--
A fully scientific test:
git grep _sources, :/*.build|cut -d: -f2|tr -d ' '|sort|uniq -c
reveals that libudev_sources is the only source list now reused twice. There's
some ugly circular dependency between libudev and libshared, and anyway I'm not
sure if we don't want to use different compilation options (LOG_REALM_…) in
those two cases, so I'm leaving that alone for now.
Diffstat (limited to 'src/resolve/meson.build')
-rw-r--r-- | src/resolve/meson.build | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/resolve/meson.build b/src/resolve/meson.build index ee1acb5166..15752d24ff 100644 --- a/src/resolve/meson.build +++ b/src/resolve/meson.build @@ -31,7 +31,7 @@ basic_dns_sources = files(''' dns_type_h = files('dns-type.h')[0] -systemd_resolved_only_sources = files(''' +systemd_resolved_sources = files(''' resolved.c resolved-manager.c resolved-manager.h @@ -80,7 +80,7 @@ systemd_resolved_only_sources = files(''' resolved-etc-hosts.c '''.split()) -systemd_resolve_only_sources = files('resolve-tool.c') +systemd_resolve_sources = files('resolve-tool.c') ############################################################ @@ -141,14 +141,13 @@ resolved_dnssd_gperf_c = custom_target( output : 'resolved-dnssd-gperf.c', command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) -systemd_resolved_sources = (basic_dns_sources + - [resolved_gperf_c, resolved_dnssd_gperf_c] + - systemd_resolved_only_sources + - dns_type_headers) +libsystemd_resolve_core = static_library( + 'systemd-resolve-core', + basic_dns_sources, + dns_type_headers, + include_directories : includes) -systemd_resolve_sources = (basic_dns_sources + - systemd_resolve_only_sources + - dns_type_headers) +systemd_resolved_sources += [resolved_gperf_c, resolved_dnssd_gperf_c] if conf.get('ENABLE_RESOLVE') == 1 install_data('org.freedesktop.resolve1.conf', @@ -178,37 +177,37 @@ endif tests += [ [['src/resolve/test-resolve-tables.c', - basic_dns_sources, dns_type_headers, 'src/shared/test-tables.h'], - [], + [libsystemd_resolve_core, + libshared], [libgcrypt, libgpg_error, libm], 'ENABLE_RESOLVE'], [['src/resolve/test-dns-packet.c', - basic_dns_sources, dns_type_headers], - [], + [libsystemd_resolve_core, + libshared], [libgcrypt, libgpg_error, libm], 'ENABLE_RESOLVE'], [['src/resolve/test-resolved-packet.c', - basic_dns_sources, dns_type_headers], - [], + [libsystemd_resolve_core, + libshared], [libgcrypt, libgpg_error, libm], 'ENABLE_RESOLVE'], [['src/resolve/test-dnssec.c', - basic_dns_sources, dns_type_headers], - [], + [libsystemd_resolve_core, + libshared], [libgcrypt, libgpg_error, libm], |