meson: add man/update-dbus-docs target
This commit is contained in:
parent
7cb4f4145f
commit
81e06775be
|
@ -34,6 +34,7 @@ custom_entities_ent = configure_file(
|
||||||
man_pages = []
|
man_pages = []
|
||||||
html_pages = []
|
html_pages = []
|
||||||
source_xml_files = []
|
source_xml_files = []
|
||||||
|
dbus_docs = []
|
||||||
foreach tuple : xsltproc.found() ? manpages : []
|
foreach tuple : xsltproc.found() ? manpages : []
|
||||||
stem = tuple[0]
|
stem = tuple[0]
|
||||||
section = tuple[1]
|
section = tuple[1]
|
||||||
|
@ -90,7 +91,11 @@ foreach tuple : xsltproc.found() ? manpages : []
|
||||||
install_dir : join_paths(docdir, 'html'))
|
install_dir : join_paths(docdir, 'html'))
|
||||||
html_pages += p3
|
html_pages += p3
|
||||||
|
|
||||||
source_xml_files += files(tuple[0] + '.xml')
|
file = files(tuple[0] + '.xml')
|
||||||
|
source_xml_files += file
|
||||||
|
if tuple[0].startswith('org.freedesktop.')
|
||||||
|
dbus_docs += file
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
message('Skipping @0@.@1@ because @2@ is false'.format(stem, section, condition))
|
message('Skipping @0@.@1@ because @2@ is false'.format(stem, section, condition))
|
||||||
endif
|
endif
|
||||||
|
@ -193,6 +198,19 @@ run_target(
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
|
if dbus_docs.length() > 0
|
||||||
|
custom_target(
|
||||||
|
'update-dbus-docs',
|
||||||
|
output : 'update-dbus-docs',
|
||||||
|
command : ['python3',
|
||||||
|
'@0@/tools/update-dbus-docs.py'.format(project_source_root),
|
||||||
|
'--build-dir=@0@'.format(project_build_root),
|
||||||
|
'@INPUT@'],
|
||||||
|
input : dbus_docs)
|
||||||
|
endif
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
|
||||||
if git.found()
|
if git.found()
|
||||||
custom_target(
|
custom_target(
|
||||||
'update-man-rules',
|
'update-man-rules',
|
||||||
|
|
|
@ -32,8 +32,9 @@ substs.set('PROJECT_VERSION', meson.project_version(),
|
||||||
# This is to be used instead of meson.source_root(), as the latter will return
|
# This is to be used instead of meson.source_root(), as the latter will return
|
||||||
# the wrong result when systemd is being built as a meson subproject
|
# the wrong result when systemd is being built as a meson subproject
|
||||||
project_source_root = meson.current_source_dir()
|
project_source_root = meson.current_source_dir()
|
||||||
|
project_build_root = meson.current_build_dir()
|
||||||
relative_source_path = run_command('realpath',
|
relative_source_path = run_command('realpath',
|
||||||
'--relative-to=@0@'.format(meson.current_build_dir()),
|
'--relative-to=@0@'.format(project_build_root),
|
||||||
project_source_root).stdout().strip()
|
project_source_root).stdout().strip()
|
||||||
conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path)
|
conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path)
|
||||||
|
|
||||||
|
@ -292,7 +293,7 @@ substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-loc
|
||||||
substs.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'yes' : 'no')
|
substs.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'yes' : 'no')
|
||||||
substs.set('STATUS_UNIT_FORMAT_DEFAULT', status_unit_format_default)
|
substs.set('STATUS_UNIT_FORMAT_DEFAULT', status_unit_format_default)
|
||||||
substs.set('HIGH_RLIMIT_NOFILE', conf.get('HIGH_RLIMIT_NOFILE'))
|
substs.set('HIGH_RLIMIT_NOFILE', conf.get('HIGH_RLIMIT_NOFILE'))
|
||||||
substs.set('BUILD_ROOT', meson.current_build_dir())
|
substs.set('BUILD_ROOT', project_build_root)
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
|
@ -3081,7 +3082,7 @@ custom_target(
|
||||||
output : 'systemd-runtest.env',
|
output : 'systemd-runtest.env',
|
||||||
command : ['sh', '-c', '{ ' +
|
command : ['sh', '-c', '{ ' +
|
||||||
'echo SYSTEMD_TEST_DATA=@0@; '.format(join_paths(project_source_root, 'test')) +
|
'echo SYSTEMD_TEST_DATA=@0@; '.format(join_paths(project_source_root, 'test')) +
|
||||||
'echo SYSTEMD_CATALOG_DIR=@0@; '.format(join_paths(meson.current_build_dir(), 'catalog')) +
|
'echo SYSTEMD_CATALOG_DIR=@0@; '.format(join_paths(project_build_root, 'catalog')) +
|
||||||
'} >@OUTPUT@'],
|
'} >@OUTPUT@'],
|
||||||
build_by_default : true)
|
build_by_default : true)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue