ALLSPHINXOPTS = \
$(common_SPHINXOPTS) \
- -D version="$(PACKAGE_VERSION)" \
-D today="$(RELEASE_DATE)" \
- -D release="$(PACKAGE_VERSION)" \
$(SPHINXOPTS) \
$(srcdir)
# flake8: noqa: E501
+import re
+
from typing import List, Tuple
from docutils import nodes
copyright = '2021, Internet Systems Consortium'
author = 'Internet Systems Consortium'
+m4_vars = {}
+with open('../../configure.ac', encoding='utf-8') as configure_ac:
+ for line in configure_ac:
+ match = re.match(r'm4_define\(\[(?P<key>bind_VERSION_[A-Z]+)\], (?P<val>[^)]*)\)dnl', line)
+ if match:
+ m4_vars[match.group('key')] = match.group('val')
+
+version = '%s.%s.%s%s' % (
+ m4_vars['bind_VERSION_MAJOR'],
+ m4_vars['bind_VERSION_MINOR'],
+ m4_vars['bind_VERSION_PATCH'],
+ m4_vars['bind_VERSION_EXTRA'],
+)
+release = version
+
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be