
It just feels nicer to be explicit about the filenames and not rely on a specific naming. Also, in meson we can directly pass the target as argument, which expands to the filename but also adds a dependency.
58 lines
1.5 KiB
Meson
58 lines
1.5 KiB
Meson
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
if enable_docs
|
|
assert(enable_introspection, '-Ddocs=true requires -Dintrospection=true')
|
|
settings_docs_input_xml = custom_target(
|
|
'settings-docs-input.xml',
|
|
input: [nm_settings_docs_xml_gir, 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'),
|
|
'@OUTPUT@',
|
|
nm_property_infos_xml['nmcli'],
|
|
nm_settings_docs_xml_gir,
|
|
],
|
|
)
|
|
|
|
settings_docs_source = custom_target(
|
|
'settings-docs.h',
|
|
input: settings_docs_input_xml,
|
|
output: 'settings-docs.h',
|
|
command: [
|
|
python.path(),
|
|
join_paths(meson.source_root(), 'tools', 'generate-docs-settings-docs.py'),
|
|
'--output', '@OUTPUT@',
|
|
'--xml', '@INPUT@'
|
|
],
|
|
)
|
|
|
|
test(
|
|
'check-settings-docs',
|
|
find_program(join_paths(source_root, 'tools', 'check-compare-generated.sh')),
|
|
args: [
|
|
source_root + '/src/libnmc-setting/settings-docs.h.in',
|
|
settings_docs_source,
|
|
],
|
|
)
|
|
else
|
|
settings_docs_source = configure_file(
|
|
input: 'settings-docs.h.in',
|
|
output: '@BASENAME@',
|
|
configuration: configuration_data(),
|
|
)
|
|
endif
|
|
|
|
libnmc_setting = static_library(
|
|
'nmc-setting',
|
|
sources: [settings_docs_source] + files(
|
|
'nm-meta-setting-access.c',
|
|
'nm-meta-setting-base-impl.c',
|
|
'nm-meta-setting-desc.c',
|
|
),
|
|
dependencies: [
|
|
libnm_dep,
|
|
],
|
|
link_depends: settings_docs_source,
|
|
)
|