2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 04:57:52 +00:00
kea/doc/make-grammar.sh.in
2025-04-28 09:41:17 +03:00

24 lines
851 B
Bash
Executable File

#!/bin/sh
# Expressions don't expand in single quotes, use double quotes for that. [SC2016]
# shellcheck disable=SC2016
set -eu
cd '@TOP_SOURCE_DIR@'
extract_bnf="@TOP_BUILD_DIR@/tools/extract_bnf.sh"
mkdir -p doc/sphinx/grammar
"${extract_bnf}" src/bin/dhcp4/dhcp4_parser \
--markdown ':ref:`dhcp4`' > doc/sphinx/grammar/grammar-dhcp4-parser.rst
"${extract_bnf}" src/bin/dhcp6/dhcp6_parser \
--markdown ':ref:`dhcp6`' > doc/sphinx/grammar/grammar-dhcp6-parser.rst
"${extract_bnf}" src/bin/d2/d2_parser \
--markdown ':ref:`dhcp-ddns-server`' > doc/sphinx/grammar/grammar-d2-parser.rst
"${extract_bnf}" src/bin/agent/agent_parser \
--markdown ':ref:`kea-ctrl-agent`' > doc/sphinx/grammar/grammar-ca-parser.rst
"${extract_bnf}" src/bin/netconf/netconf_parser \
--markdown ':ref:`netconf`' > doc/sphinx/grammar/grammar-netconf-parser.rst