From: Jérémy Rosen Date: Sat, 18 Apr 2020 17:48:13 +0000 (+0200) Subject: make-directive-index: allow variablelist to specify an element to index X-Git-Tag: v246-rc1~549^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8906e262784bcb3989c6103803834ed35f6214d7;p=thirdparty%2Fsystemd.git make-directive-index: allow variablelist to specify an element to index This commit looks for a new "extra-ref" attribute in If this attribute is specified, its content will be index as pointing to the current man-page in systemd.directives --- diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py index 659c6275f5f..0333a92a1d9 100755 --- a/tools/make-directive-index.py +++ b/tools/make-directive-index.py @@ -200,6 +200,13 @@ def _extract_directives(directive_groups, formatting, page): name.tail = '' name.text = text formatting[text] = name + extra = variablelist.attrib.get('extra-ref') + if extra: + stor[extra].append((pagename, section)) + if extra not in formatting: + elt = tree.Element("varname") + elt.text= extra + formatting[extra] = elt storfile = directive_groups['filenames'] for xpath, absolute_only in (('.//refsynopsisdiv//filename', False),