build: meson: fix some missing dependencies
Some targets related to documentation generation had missing dependencies, like xsl templates or the python generator. If these files are changed, their output changes too, but as they were not listed as dependencies (custom_target's input), meson wasn't aware. In Makefile.am they already were correctly listed as dependencies.
This commit is contained in:
@@ -62,35 +62,36 @@ foreach man: mans
|
||||
endforeach
|
||||
|
||||
if enable_introspection
|
||||
merge_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py')
|
||||
|
||||
name = 'dbus'
|
||||
nm_settings_docs_xml_dbus = custom_target(
|
||||
'nm-settings-docs-' + name + '.xml',
|
||||
input: [nm_settings_docs_xml_gir[name], nm_property_infos_xml[name]],
|
||||
input: [merge_cmd, nm_property_infos_xml[name], nm_settings_docs_xml_gir[name]],
|
||||
output: 'nm-settings-docs-' + name + '.xml',
|
||||
command: [
|
||||
python.path(),
|
||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py'),
|
||||
merge_cmd,
|
||||
'@OUTPUT@',
|
||||
nm_property_infos_xml[name],
|
||||
nm_settings_docs_xml_gir[name],
|
||||
nm_settings_docs_xml_gir[name]
|
||||
],
|
||||
)
|
||||
|
||||
name = 'nmcli'
|
||||
nm_settings_docs_xml_nmcli = custom_target(
|
||||
'nm-settings-docs-' + name + '.xml',
|
||||
input: [nm_settings_docs_xml_gir[name], nm_property_infos_xml[name]],
|
||||
input: [merge_cmd, nm_property_infos_xml[name], gen_metadata_nm_settings_nmcli_xml, nm_settings_docs_xml_gir[name]],
|
||||
output: 'nm-settings-docs-' + name + '.xml',
|
||||
command: [
|
||||
python.path(),
|
||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py'),
|
||||
merge_cmd,
|
||||
'@OUTPUT@',
|
||||
'--only-properties-from',
|
||||
gen_metadata_nm_settings_nmcli_xml,
|
||||
nm_property_infos_xml[name],
|
||||
gen_metadata_nm_settings_nmcli_xml,
|
||||
nm_settings_docs_xml_gir[name],
|
||||
nm_settings_docs_xml_gir[name]
|
||||
],
|
||||
)
|
||||
|
||||
@@ -111,12 +112,13 @@ if enable_introspection
|
||||
|
||||
foreach man: mans
|
||||
output = man[0] + '.xml'
|
||||
template = join_paths(meson.current_source_dir(), man[0] + '.xsl')
|
||||
|
||||
input = custom_target(
|
||||
output,
|
||||
input: man[2],
|
||||
input: [template, man[2]],
|
||||
output: output,
|
||||
command: xsltproc_options + [join_paths(meson.current_source_dir(), man[0] + '.xsl'), '@INPUT@'],
|
||||
command: xsltproc_options + '@INPUT@',
|
||||
)
|
||||
content_files += input.full_path()
|
||||
|
||||
|
@@ -175,6 +175,9 @@ if enable_introspection
|
||||
endif
|
||||
ld_library_path = meson.current_build_dir() + ld_library_path
|
||||
|
||||
gen_infos_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-nm-property-infos.py')
|
||||
gen_gir_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py')
|
||||
|
||||
names = [ 'dbus', 'nmcli', 'keyfile' ]
|
||||
if enable_ifcfg_rh
|
||||
names += [ 'ifcfg-rh' ]
|
||||
@@ -182,29 +185,29 @@ if enable_introspection
|
||||
foreach name: names
|
||||
t_infos = custom_target(
|
||||
'nm-property-infos-' + name + '.xml',
|
||||
input: [libnm_gir[0]] + libnm_core_settings_sources,
|
||||
input: [gen_infos_cmd, libnm_gir[0]] + libnm_core_settings_sources,
|
||||
output: 'nm-property-infos-' + name + '.xml',
|
||||
command: [
|
||||
python.path(),
|
||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-property-infos.py'),
|
||||
gen_infos_cmd,
|
||||
name,
|
||||
'@OUTPUT@',
|
||||
'@INPUT@'
|
||||
],
|
||||
libnm_gir[0]
|
||||
] + libnm_core_settings_sources,
|
||||
)
|
||||
|
||||
t_gir = custom_target(
|
||||
'nm-settings-docs-gir-' + name + '.xml',
|
||||
input: libnm_gir[0],
|
||||
input: [gen_gir_cmd, libnm_gir[0]],
|
||||
output: 'nm-settings-docs-gir-' + name + '.xml',
|
||||
command: [
|
||||
'env',
|
||||
'GI_TYPELIB_PATH=' + gi_typelib_path,
|
||||
'LD_LIBRARY_PATH=' + ld_library_path,
|
||||
python.path(),
|
||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py'),
|
||||
gen_gir_cmd,
|
||||
'--lib-path', meson.current_build_dir(),
|
||||
'--gir', '@INPUT@',
|
||||
'--gir', libnm_gir[0],
|
||||
'--output', '@OUTPUT@',
|
||||
'--target', name
|
||||
],
|
||||
|
@@ -2,28 +2,31 @@
|
||||
|
||||
if enable_docs
|
||||
assert(enable_introspection, '-Ddocs=true requires -Dintrospection=true')
|
||||
|
||||
merge_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py')
|
||||
settings_docs_input_xml = custom_target(
|
||||
'settings-docs-input.xml',
|
||||
input: [nm_settings_docs_xml_gir['nmcli'], nm_property_infos_xml['nmcli']],
|
||||
input: [merge_cmd, nm_settings_docs_xml_gir['nmcli'], nm_property_infos_xml['nmcli']],
|
||||
output: 'settings-docs-input.xml',
|
||||
command: [
|
||||
python.path(),
|
||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py'),
|
||||
merge_cmd,
|
||||
'@OUTPUT@',
|
||||
nm_property_infos_xml['nmcli'],
|
||||
nm_settings_docs_xml_gir['nmcli'],
|
||||
],
|
||||
)
|
||||
|
||||
gen_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-settings-docs.py')
|
||||
settings_docs_source = custom_target(
|
||||
'settings-docs.h',
|
||||
input: settings_docs_input_xml,
|
||||
input: [gen_cmd, settings_docs_input_xml],
|
||||
output: 'settings-docs.h',
|
||||
command: [
|
||||
python.path(),
|
||||
join_paths(meson.source_root(), 'tools', 'generate-docs-settings-docs.py'),
|
||||
gen_cmd,
|
||||
'--output', '@OUTPUT@',
|
||||
'--xml', '@INPUT@'
|
||||
'--xml', settings_docs_input_xml
|
||||
],
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user