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
|
endforeach
|
||||||
|
|
||||||
if enable_introspection
|
if enable_introspection
|
||||||
|
merge_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py')
|
||||||
|
|
||||||
name = 'dbus'
|
name = 'dbus'
|
||||||
nm_settings_docs_xml_dbus = custom_target(
|
nm_settings_docs_xml_dbus = custom_target(
|
||||||
'nm-settings-docs-' + name + '.xml',
|
'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',
|
output: 'nm-settings-docs-' + name + '.xml',
|
||||||
command: [
|
command: [
|
||||||
python.path(),
|
python.path(),
|
||||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py'),
|
merge_cmd,
|
||||||
'@OUTPUT@',
|
'@OUTPUT@',
|
||||||
nm_property_infos_xml[name],
|
nm_property_infos_xml[name],
|
||||||
nm_settings_docs_xml_gir[name],
|
nm_settings_docs_xml_gir[name]
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
name = 'nmcli'
|
name = 'nmcli'
|
||||||
nm_settings_docs_xml_nmcli = custom_target(
|
nm_settings_docs_xml_nmcli = custom_target(
|
||||||
'nm-settings-docs-' + name + '.xml',
|
'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',
|
output: 'nm-settings-docs-' + name + '.xml',
|
||||||
command: [
|
command: [
|
||||||
python.path(),
|
python.path(),
|
||||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py'),
|
merge_cmd,
|
||||||
'@OUTPUT@',
|
'@OUTPUT@',
|
||||||
'--only-properties-from',
|
'--only-properties-from',
|
||||||
gen_metadata_nm_settings_nmcli_xml,
|
gen_metadata_nm_settings_nmcli_xml,
|
||||||
nm_property_infos_xml[name],
|
nm_property_infos_xml[name],
|
||||||
gen_metadata_nm_settings_nmcli_xml,
|
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
|
foreach man: mans
|
||||||
output = man[0] + '.xml'
|
output = man[0] + '.xml'
|
||||||
|
template = join_paths(meson.current_source_dir(), man[0] + '.xsl')
|
||||||
|
|
||||||
input = custom_target(
|
input = custom_target(
|
||||||
output,
|
output,
|
||||||
input: man[2],
|
input: [template, man[2]],
|
||||||
output: output,
|
output: output,
|
||||||
command: xsltproc_options + [join_paths(meson.current_source_dir(), man[0] + '.xsl'), '@INPUT@'],
|
command: xsltproc_options + '@INPUT@',
|
||||||
)
|
)
|
||||||
content_files += input.full_path()
|
content_files += input.full_path()
|
||||||
|
|
||||||
|
@@ -175,6 +175,9 @@ if enable_introspection
|
|||||||
endif
|
endif
|
||||||
ld_library_path = meson.current_build_dir() + ld_library_path
|
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' ]
|
names = [ 'dbus', 'nmcli', 'keyfile' ]
|
||||||
if enable_ifcfg_rh
|
if enable_ifcfg_rh
|
||||||
names += [ 'ifcfg-rh' ]
|
names += [ 'ifcfg-rh' ]
|
||||||
@@ -182,29 +185,29 @@ if enable_introspection
|
|||||||
foreach name: names
|
foreach name: names
|
||||||
t_infos = custom_target(
|
t_infos = custom_target(
|
||||||
'nm-property-infos-' + name + '.xml',
|
'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',
|
output: 'nm-property-infos-' + name + '.xml',
|
||||||
command: [
|
command: [
|
||||||
python.path(),
|
python.path(),
|
||||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-property-infos.py'),
|
gen_infos_cmd,
|
||||||
name,
|
name,
|
||||||
'@OUTPUT@',
|
'@OUTPUT@',
|
||||||
'@INPUT@'
|
libnm_gir[0]
|
||||||
],
|
] + libnm_core_settings_sources,
|
||||||
)
|
)
|
||||||
|
|
||||||
t_gir = custom_target(
|
t_gir = custom_target(
|
||||||
'nm-settings-docs-gir-' + name + '.xml',
|
'nm-settings-docs-gir-' + name + '.xml',
|
||||||
input: libnm_gir[0],
|
input: [gen_gir_cmd, libnm_gir[0]],
|
||||||
output: 'nm-settings-docs-gir-' + name + '.xml',
|
output: 'nm-settings-docs-gir-' + name + '.xml',
|
||||||
command: [
|
command: [
|
||||||
'env',
|
'env',
|
||||||
'GI_TYPELIB_PATH=' + gi_typelib_path,
|
'GI_TYPELIB_PATH=' + gi_typelib_path,
|
||||||
'LD_LIBRARY_PATH=' + ld_library_path,
|
'LD_LIBRARY_PATH=' + ld_library_path,
|
||||||
python.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(),
|
'--lib-path', meson.current_build_dir(),
|
||||||
'--gir', '@INPUT@',
|
'--gir', libnm_gir[0],
|
||||||
'--output', '@OUTPUT@',
|
'--output', '@OUTPUT@',
|
||||||
'--target', name
|
'--target', name
|
||||||
],
|
],
|
||||||
|
@@ -2,28 +2,31 @@
|
|||||||
|
|
||||||
if enable_docs
|
if enable_docs
|
||||||
assert(enable_introspection, '-Ddocs=true requires -Dintrospection=true')
|
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 = custom_target(
|
||||||
'settings-docs-input.xml',
|
'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',
|
output: 'settings-docs-input.xml',
|
||||||
command: [
|
command: [
|
||||||
python.path(),
|
python.path(),
|
||||||
join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-merge.py'),
|
merge_cmd,
|
||||||
'@OUTPUT@',
|
'@OUTPUT@',
|
||||||
nm_property_infos_xml['nmcli'],
|
nm_property_infos_xml['nmcli'],
|
||||||
nm_settings_docs_xml_gir['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_source = custom_target(
|
||||||
'settings-docs.h',
|
'settings-docs.h',
|
||||||
input: settings_docs_input_xml,
|
input: [gen_cmd, settings_docs_input_xml],
|
||||||
output: 'settings-docs.h',
|
output: 'settings-docs.h',
|
||||||
command: [
|
command: [
|
||||||
python.path(),
|
python.path(),
|
||||||
join_paths(meson.source_root(), 'tools', 'generate-docs-settings-docs.py'),
|
gen_cmd,
|
||||||
'--output', '@OUTPUT@',
|
'--output', '@OUTPUT@',
|
||||||
'--xml', '@INPUT@'
|
'--xml', settings_docs_input_xml
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user