summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-02-27 20:16:38 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-02-27 21:55:00 -0500
commit185c3be03cec26023acc11b49553753aa7330a1d (patch)
tree7c8245e5aa1bb299ae4837cdb71d94e2427726b5
parentfcc43d015815c23700854a8d3800850910282c8c (diff)
build-sys: fix update-man-rules for vpath builds
-rw-r--r--Makefile-man.am2
-rw-r--r--Makefile.am2
-rw-r--r--make-man-rules.py6
3 files changed, 6 insertions, 4 deletions
diff --git a/Makefile-man.am b/Makefile-man.am
index 526c05d521..9a2f2f5504 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -1,5 +1,5 @@
# Do not edit. Generated by make-man-rules.py.
-# Regenerate with 'make update-man-list'.
+# Regenerate with 'make all update-man-list'.
MANPAGES += \
man/bootup.7 \
diff --git a/Makefile.am b/Makefile.am
index e0c8529e8e..cc0d4da22f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -519,7 +519,7 @@ man/index.html:
NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
-XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_srcdir)/man/*.xml.in)
+XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_srcdir)/man/*.xml.in $(top_builddir)/man/*.xml)
update-man-list: make-man-rules.py $(XML_GLOB)
$(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
$(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
diff --git a/make-man-rules.py b/make-man-rules.py
index 9c50c8dec2..5415984d88 100644
--- a/make-man-rules.py
+++ b/make-man-rules.py
@@ -21,6 +21,7 @@ from __future__ import print_function
import xml.etree.ElementTree as tree
import collections
import sys
+import os
SECTION = '''\
MANPAGES += \\
@@ -40,7 +41,7 @@ endif
HEADER = '''\
# Do not edit. Generated by make-man-rules.py.
-# Regenerate with 'make update-man-list'.
+# Regenerate with 'make all update-man-list'.
'''
@@ -96,7 +97,8 @@ def make_makefile(rules, cleanfiles):
if __name__ == '__main__':
sources = set(sys.argv[1:])
+ basenames = [os.path.basename(source) for source in sources]
spares = set([source for source in sources
- if source + '.in' in sources])
+ if os.path.basename(source) + '.in' in basenames])
rules = create_rules(*(sources - spares))
print(make_makefile(rules, spares), end='')