subdir('sphinx')
subdir('devel')

examples = [
    'examples/agent/comments.json',
    'examples/agent/https.json',
    'examples/agent/rbac.json',
    'examples/agent/simple.json',
    'examples/ddns/all-keys.json',
    'examples/ddns/all-keys-netconf.json',
    'examples/ddns/comments.json',
    'examples/ddns/gss-tsig.json',
    'examples/ddns/sample1.json',
    'examples/ddns/template.json',
    'examples/https/httpd2/kea-httpd2.conf',
    'examples/https/nginx/kea-nginx.conf',
    'examples/https/shell/kea-stunnel.conf',
    'examples/kea4/advanced.json',
    'examples/kea4/all-keys.json',
    'examples/kea4/all-keys-netconf.json',
    'examples/kea4/all-options.json',
    'examples/kea4/backends.json',
    'examples/kea4/classify.json',
    'examples/kea4/classify2.json',
    'examples/kea4/comments.json',
    'examples/kea4/config-backend.json',
    'examples/kea4/dhcpv4-over-dhcpv6.json',
    'examples/kea4/global-reservations.json',
    'examples/kea4/ha-load-balancing-server1-mt-with-tls.json',
    'examples/kea4/ha-load-balancing-server2-mt.json',
    'examples/kea4/hooks.json',
    'examples/kea4/hooks-radius.json',
    'examples/kea4/leases-expiration.json',
    'examples/kea4/multiple-options.json',
    'examples/kea4/mysql-reservations.json',
    'examples/kea4/pgsql-reservations.json',
    'examples/kea4/reservations.json',
    'examples/kea4/several-subnets.json',
    'examples/kea4/shared-network.json',
    'examples/kea4/single-subnet.json',
    'examples/kea4/with-ddns.json',
    'examples/kea4/vivso.json',
    'examples/kea4/vendor-specific.json',
    'examples/kea6/advanced.json',
    'examples/kea6/all-keys.json',
    'examples/kea6/all-keys-netconf.json',
    'examples/kea6/all-options.json',
    'examples/kea6/backends.json',
    'examples/kea6/classify.json',
    'examples/kea6/classify2.json',
    'examples/kea6/comments.json',
    'examples/kea6/config-backend.json',
    'examples/kea6/dhcpv4-over-dhcpv6.json',
    'examples/kea6/duid.json',
    'examples/kea6/global-reservations.json',
    'examples/kea6/ha-hot-standby-server1-with-tls.json',
    'examples/kea6/ha-hot-standby-server2.json',
    'examples/kea6/hooks.json',
    'examples/kea6/iPXE.json',
    'examples/kea6/leases-expiration.json',
    'examples/kea6/multiple-options.json',
    'examples/kea6/mysql-reservations.json',
    'examples/kea6/pgsql-reservations.json',
    'examples/kea6/reservations.json',
    'examples/kea6/several-subnets.json',
    'examples/kea6/shared-network.json',
    'examples/kea6/simple.json',
    'examples/kea6/softwire46.json',
    'examples/kea6/stateless.json',
    'examples/kea6/tee-times.json',
    'examples/kea6/with-ddns.json',
    'examples/netconf/kea-dhcp6-operations/boot.json',
    'examples/netconf/kea-dhcp6-operations/logging.xml',
    'examples/netconf/kea-dhcp6-operations/netconf.json',
    'examples/netconf/kea-dhcp6-operations/startup.xml',
    'examples/netconf/kea-dhcp6-operations/twopools.xml',
    'examples/netconf/kea-dhcp6-operations/twosubnets.xml',
    'examples/netconf/comments.json',
    'examples/netconf/simple-dhcp4.json',
    'examples/netconf/simple-dhcp6.json',
    'examples/template-power-user-home/info.md',
    'examples/template-power-user-home/kea-ca-1.conf',
    'examples/template-power-user-home/kea-ca-2.conf',
    'examples/template-power-user-home/kea-dhcp4-1.conf',
    'examples/template-power-user-home/kea-dhcp4-2.conf',
    'examples/template-ha-mt-tls/info.md',
    'examples/template-ha-mt-tls/kea-ca-1.conf',
    'examples/template-ha-mt-tls/kea-ca-2.conf',
    'examples/template-ha-mt-tls/kea-dhcp4-1.conf',
    'examples/template-ha-mt-tls/kea-dhcp4-2.conf',
]
install_data(examples, preserve_path: true, install_dir: 'share/doc/kea')

make_grammar = configure_file(
    input: 'make-grammar.sh.in',
    output: 'make-grammar.sh',
    configuration: {
        'TOP_BUILD_DIR': TOP_BUILD_DIR,
        'TOP_SOURCE_DIR': TOP_SOURCE_DIR,
    },
)
run_target('grammar', command: [make_grammar])
