mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
build-sys: fix update-man-rules for vpath builds
This commit is contained in:
parent
fcc43d0158
commit
185c3be03c
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -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='')
|
||||
|
Loading…
x
Reference in New Issue
Block a user