meson: Improve libnm documentation build file

the `doc_module` variable has been removed. It was created because
its used in the autotools build file but actually `libnm_name`
variable can be used easily.

Different objects used in the documentation target have been grouped
together.

The content file `version.xml` is now added properly.
This commit is contained in:
Iñigo Martínez 2019-09-11 13:15:22 +02:00 committed by Thomas Haller
parent 700f6f6b5f
commit 9d4e1ad5e3

View file

@ -1,4 +1,7 @@
doc_module = libnm_name src_dirs = [
libnm_core_inc,
libnm_inc,
]
private_headers = [ private_headers = [
'common.h', 'common.h',
@ -26,29 +29,29 @@ private_headers = [
'test-general-enums.h', 'test-general-enums.h',
] ]
configure_file( scan_args = [
'--rebuild-types',
'--rebuild-sections',
'--ignore-decorators=NM_AVAILABLE_IN_\d_\d\d?|NM_DEPRECATED_IN_\d_\d\d?',
'--ignore-headers=' + ' '.join(private_headers),
]
version_xml = configure_file(
input: 'version.xml.in', input: 'version.xml.in',
output: '@BASENAME@', output: '@BASENAME@',
configuration: version_conf, configuration: version_conf,
) )
gnome.gtkdoc( gnome.gtkdoc(
doc_module, libnm_name,
main_xml: doc_module + '-docs.xml', main_xml: libnm_name + '-docs.xml',
src_dir: [ src_dir: src_dirs,
libnm_core_inc,
libnm_inc,
],
dependencies: libnm_dep, dependencies: libnm_dep,
scan_args: [ scan_args: scan_args,
'--rebuild-types',
'--rebuild-sections',
'--ignore-decorators=NM_AVAILABLE_IN_\d_\d\d?|NM_DEPRECATED_IN_\d_\d\d?',
'--ignore-headers=' + ' '.join(private_headers),
],
scanobjs_args: '--type-init-func="g_type_init();"', scanobjs_args: '--type-init-func="g_type_init();"',
fixxref_args: '--html-dir=' + join_paths(nm_prefix, gnome.gtkdoc_html_dir(doc_module)), fixxref_args: '--html-dir=' + join_paths(nm_prefix, gnome.gtkdoc_html_dir(libnm_name)),
gobject_typesfile: doc_module + '.types', gobject_typesfile: libnm_name + '.types',
html_assets: doc_module + '.png', html_assets: 'libnm.png',
content_files: version_xml,
install: true, install: true,
) )