summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-02-19 16:06:10 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-02-20 22:43:27 -0500
commitc0652d453e2329fa465f71d4c68f5fe8618a7de2 (patch)
tree62ccb1edef613eff72d950e6afa09c0848caeae9 /tools
parentef417cfd2211ae017a38b9796c6db29130133e63 (diff)
downloadsystemd-c0652d453e2329fa465f71d4c68f5fe8618a7de2.tar.gz
man: ignore non-manpage files when generating makefile
Diffstat (limited to 'tools')
-rw-r--r--tools/make-man-rules.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/make-man-rules.py b/tools/make-man-rules.py
index 0d1ca244c4..6224de3cc0 100644
--- a/tools/make-man-rules.py
+++ b/tools/make-man-rules.py
@@ -66,6 +66,8 @@ def xml(file):
def add_rules(rules, name):
xml = xml_parse(name)
# print('parsing {}'.format(name), file=sys.stderr)
+ if xml.getroot().tag != 'refentry':
+ return
conditional = xml.getroot().get('conditional') or ''
rulegroup = rules[conditional]
refmeta = xml.find('./refmeta')
@@ -86,7 +88,11 @@ def create_rules(xml_files):
" {conditional => {alias-name => source-name}} "
rules = collections.defaultdict(dict)
for name in xml_files:
- add_rules(rules, name)
+ try:
+ add_rules(rules, name)
+ except Exception:
+ print("Failed to process", name, file=sys.stderr)
+ raise
return rules
def mjoin(files):