2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 10:10:06 +00:00
bind/lib/dns/meson.build
Aydın Mercan 5cd6c173ff
replace the build system with meson
Meson is a modern build system that has seen a rise in adoption and some
version of it is available in almost every platform supported.

Compared to automake, meson has the following advantages:

* Meson provides a significant boost to the build and configuration time
  by better exploiting parallelism.

* Meson is subjectively considered to be better in readability.

These merits alone justify experimenting with meson as a way of
improving development time and ergonomics. However, there are some
compromises to ensure the transition goes relatively smooth:

* The system tests currently rely on various files within the source
  directory. Changing this requirement is a non-trivial task that can't
  be currently justified. Currently the last compiled build directory
  writes into the source tree which is in turn used by pytest.

* The minimum version supported has been fixed at 0.61. Increasing this
  value will require choosing a baseline of distributions that can
  package with meson. On the contrary, there will likely be an attempt
  to decrease this value to ensure almost universal support for building
  BIND 9 with meson.
2025-06-11 10:30:12 +03:00

167 lines
3.7 KiB
Meson

# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
probe_src = [dtrace_header.process('probes.d'), files('xfrin.c')]
# dns_inc += include_directories('include')
dns_inc_p += include_directories('.')
dns_header_depfiles = []
subdir('rdata')
dns_gen_headers = []
dns_header_gen = executable(
'gen',
files('gen.c'),
install: false,
native: true,
)
subdir('include')
dns_srcset.add(dns_gen_headers)
dns_srcset.add(when: dnstap_dep, if_true: files('dnstap.c'))
dns_srcset.add(when: maxminddb_dep, if_true: files('geoip2.c'))
dns_srcset.add(when: [gssapi_dep, krb5_dep], if_true: files('gssapi_link.c'))
dns_srcset.add(
custom_target(
'dns-code',
output: 'code.h',
depend_files: dns_header_depfiles,
capture: true,
command: [dns_header_gen, '-s', meson.current_source_dir()],
),
)
if config.get('HAVE_DTRACE')
dns_probe_objects += static_library(
'dns-probe-target',
probe_src,
build_by_default: false,
dependencies: urcu_dep,
implicit_include_directories: false,
include_directories: [isc_inc, dns_inc, dns_inc_p],
sources: dns_gen_headers,
).extract_all_objects(recursive: false)
endif
dns_srcset.add(
when: 'HAVE_DTRACE',
if_true: custom_target(
'dns-probe',
input: [files('probes.d'), dns_probe_objects],
output: 'dns-probes.o',
command: [
dtrace,
'-G',
'-o', '@OUTPUT@',
'-s', '@INPUT@',
],
),
if_false: probe_src,
)
dns_srcset.add(
files(
'acl.c',
'adb.c',
'badcache.c',
'byaddr.c',
'cache.c',
'callbacks.c',
'catz.c',
'client.c',
'clientinfo.c',
'compress.c',
'db.c',
'dbiterator.c',
'diff.c',
'dispatch.c',
'dlz.c',
'dns64.c',
'dnssec.c',
'ds.c',
'dst_api.c',
'dst_parse.c',
'dyndb.c',
'ecs.c',
'ede.c',
'fixedname.c',
'forward.c',
'gssapictx.c',
'hmac_link.c',
'ipkeylist.c',
'iptable.c',
'journal.c',
'kasp.c',
'key.c',
'keydata.c',
'keymgr.c',
'keystore.c',
'keytable.c',
'lib.c',
'master.c',
'masterdump.c',
'message.c',
'name.c',
'nametree.c',
'ncache.c',
'nsec.c',
'nsec3.c',
'nta.c',
'openssl_link.c',
'opensslecdsa_link.c',
'openssleddsa_link.c',
'opensslrsa_link.c',
'order.c',
'peer.c',
'private.c',
'qp.c',
'qpcache.c',
'qpzone.c',
'rcode.c',
'rdata.c',
'rdatalist.c',
'rdataset.c',
'rdatasetiter.c',
'rdataslab.c',
'remote.c',
'request.c',
'resconf.c',
'resolver.c',
'result.c',
'rootns.c',
'rpz.c',
'rriterator.c',
'rrl.c',
'sdlz.c',
'skr.c',
'soa.c',
'ssu.c',
'ssu_external.c',
'stats.c',
'time.c',
'tkey.c',
'transport.c',
'tsig.c',
'ttl.c',
'unreachcache.c',
'update.c',
'validator.c',
'view.c',
'zone.c',
'zoneverify.c',
'zt.c',
),
)