summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/make-man-index.py2
-rwxr-xr-xtools/update-man-rules.py14
2 files changed, 8 insertions, 8 deletions
diff --git a/tools/make-man-index.py b/tools/make-man-index.py
index 66027af02e..4d206ca0b6 100755
--- a/tools/make-man-index.py
+++ b/tools/make-man-index.py
@@ -9,7 +9,7 @@ from xml_helper import xml_parse, xml_print, tree
MDASH = ' — ' if sys.version_info.major >= 3 else ' -- '
TEMPLATE = '''\
-<refentry id="systemd.index" conditional="HAVE_PYTHON">
+<refentry id="systemd.index">
<refentryinfo>
<title>systemd.index</title>
diff --git a/tools/update-man-rules.py b/tools/update-man-rules.py
index c404579a2a..f5db691f3e 100755
--- a/tools/update-man-rules.py
+++ b/tools/update-man-rules.py
@@ -4,16 +4,13 @@
from __future__ import print_function
import collections
import sys
-import os.path
import pprint
+from os.path import basename
from xml_helper import xml_parse
def man(page, number):
return '{}.{}'.format(page, number)
-def xml(file):
- return os.path.basename(file)
-
def add_rules(rules, name):
xml = xml_parse(name)
# print('parsing {}'.format(name), file=sys.stderr)
@@ -78,9 +75,12 @@ def make_mesonfile(rules, dist_files):
if __name__ == '__main__':
pages = sys.argv[1:]
+ pages = (p for p in pages
+ if basename(p) not in {
+ 'systemd.directives.xml',
+ 'systemd.index.xml',
+ 'directives-template.xml'})
rules = create_rules(pages)
- dist_files = (xml(file) for file in pages
- if not file.endswith(".directives.xml") and
- not file.endswith(".index.xml"))
+ dist_files = (basename(p) for p in pages)
print(make_mesonfile(rules, dist_files))