Files
NetworkManager/docs/api/meson.build
Thomas Haller 69b8036f37 build/meson: fix location of introspection files
With glib < 2.51.3, gdbus-codegen does not understand "--output-directory" [1].
Hence, the generated files are like

    "build/dbus-org.freedesktop.NetworkManager.Device.WifiP2P.xml"

instead of

    "build/introspection/dbus-org.freedesktop.NetworkManager.Device.WifiP2P.xml"

But gnome.gdbus_codegen() returns a path as if it would be inside
"build/introspection". Hack around that, by patching the correct path
otherwise. This is still ugly, because repeated "ninja -C build" calls
will always try to rebuild this target (because the wrong file name
is considered).

See also [2].

[1] ee09bb704f
[2] 2e93ed58c3/mesonbuild/modules/gnome.py (L1170)

(cherry picked from commit ad9e5995e1)
2019-04-18 20:20:46 +02:00

49 lines
1.2 KiB
Meson

doc_module = nm_name
settings = 'settings-spec'
output = settings + '.xml'
if enable_introspection
settings_xml = custom_target(
output,
input: nm_settings_docs,
output: output,
command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), settings + '.xsl'), '@INPUT@'],
# FIXME: there is no target depending on this, so it will not be built
build_by_default: true,
)
endif
configure_file(
input: version_xml + '.in',
output: version_xml,
configuration: version_conf,
)
content_files += join_paths(meson.source_root(), 'COPYING')
filecopier = find_program('cp')
foreach intro : introspection_files
path = intro[1].split('/')[-1]
custom_target(path,
input: intro[0],
output: path,
command: [filecopier, intro[1], '@OUTPUT@'],
build_by_default: true,
)
endforeach
custom_target('common.ent',
input: common_ent_file,
output: 'common.ent',
command: [filecopier, '@INPUT@', '@OUTPUT@'],
build_by_default: true,
)
gnome.gtkdoc(
doc_module,
main_xml: 'network-manager-docs.xml',
src_dir: meson.current_source_dir(),
content_files: content_files,
install: true,
)