
Addition of list and string is allowed but only from version 0.60 of
meson. We claim to support building with meson 0.47, and there are
distributions like Debian and CentOS Stream 8 that uses versions older
than 0.60. Fix it by converting the offending string to a single item
list.
On newer versions, we get this warning only:
Project targets '>= 0.47.2' but uses feature introduced in
'0.60.0': list.<plus>. The right hand operand was not a list.
Fixes: 984642e33f
('build: meson: fix some missing dependencies')
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1737
137 lines
3.5 KiB
Meson
137 lines
3.5 KiB
Meson
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
common_ent_file = configure_file(
|
|
input: 'common.ent.in',
|
|
output: '@BASENAME@',
|
|
configuration: data_conf,
|
|
)
|
|
|
|
xsltproc_options = [
|
|
xsltproc,
|
|
'--output', '@OUTPUT@',
|
|
'--path', meson.current_build_dir(),
|
|
'--xinclude',
|
|
'--nonet',
|
|
'--stringparam', 'man.output.quietly', '1',
|
|
'--stringparam', 'funcsynopsis.style', 'ansi',
|
|
'--stringparam', 'man.th.extra1.suppress', '1',
|
|
'--stringparam', 'man.authors.section.enabled', '0',
|
|
'--stringparam', 'man.copyright.section.enabled', '0',
|
|
'--stringparam', 'man.th.title.max.length', '30',
|
|
]
|
|
|
|
docbook_xls = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
|
|
|
|
mans_xmls = []
|
|
|
|
mans = [
|
|
['NetworkManager', '8'],
|
|
['NetworkManager-dispatcher', '8'],
|
|
['NetworkManager-wait-online.service', '8'],
|
|
['NetworkManager.conf', '5'],
|
|
['nm-online', '1'],
|
|
['nmcli-examples', '7'],
|
|
['nmcli', '1'],
|
|
['nmtui', '1'],
|
|
['nm-initrd-generator', '8'],
|
|
]
|
|
|
|
if enable_ovs
|
|
mans += [['nm-openvswitch', '7']]
|
|
endif
|
|
|
|
if enable_nm_cloud_setup
|
|
mans += [['nm-cloud-setup', '8']]
|
|
endif
|
|
|
|
foreach man: mans
|
|
input = man[0] + '.xml'
|
|
content_files += join_paths(meson.current_source_dir(), input)
|
|
|
|
output = '@0@.@1@'.format(man[0], man[1])
|
|
|
|
custom_target(
|
|
output,
|
|
input: input,
|
|
output: output,
|
|
command: xsltproc_options + [docbook_xls, '@INPUT@'],
|
|
depend_files: common_ent_file,
|
|
install: true,
|
|
install_dir: join_paths(nm_mandir, 'man' + man[1]),
|
|
)
|
|
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: [merge_cmd, nm_property_infos_xml[name], nm_settings_docs_xml_gir[name]],
|
|
output: 'nm-settings-docs-' + name + '.xml',
|
|
command: [
|
|
python.path(),
|
|
merge_cmd,
|
|
'@OUTPUT@',
|
|
nm_property_infos_xml[name],
|
|
nm_settings_docs_xml_gir[name]
|
|
],
|
|
)
|
|
|
|
name = 'nmcli'
|
|
nm_settings_docs_xml_nmcli = custom_target(
|
|
'nm-settings-docs-' + name + '.xml',
|
|
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(),
|
|
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 = {
|
|
'dbus': nm_settings_docs_xml_dbus,
|
|
'nmcli': nm_settings_docs_xml_nmcli,
|
|
}
|
|
|
|
mans = [
|
|
['nm-settings-keyfile', '5', nm_property_infos_xml['keyfile']],
|
|
['nm-settings-dbus', '5', nm_settings_docs_xml['dbus']],
|
|
['nm-settings-nmcli', '5', nm_settings_docs_xml['nmcli']],
|
|
]
|
|
|
|
if enable_ifcfg_rh
|
|
mans += [['nm-settings-ifcfg-rh', '5', nm_property_infos_xml['ifcfg-rh']]]
|
|
endif
|
|
|
|
foreach man: mans
|
|
output = man[0] + '.xml'
|
|
template = join_paths(meson.current_source_dir(), man[0] + '.xsl')
|
|
|
|
input = custom_target(
|
|
output,
|
|
input: [template, man[2]],
|
|
output: output,
|
|
command: xsltproc_options + ['@INPUT@'],
|
|
)
|
|
content_files += input.full_path()
|
|
|
|
output = '@0@.@1@'.format(man[0], man[1])
|
|
|
|
custom_target(
|
|
output,
|
|
input: input,
|
|
output: output,
|
|
command: xsltproc_options + [docbook_xls, '@INPUT@'],
|
|
install: true,
|
|
install_dir: join_paths(nm_mandir, 'man' + man[1]),
|
|
)
|
|
endforeach
|
|
endif
|