Skip to content

Commit

Permalink
docs: Work-around creation of umockdev.types
Browse files Browse the repository at this point in the history
meson doesn't seem to have a way to tell gtk-doc where the .c files to
extract the type functions from would be when they're generated, like
they are for Vala sources.

Work around this by providing a static .types file.

See mesonbuild/meson#3892
  • Loading branch information
hadess authored and benzea committed Aug 27, 2021
1 parent db21db5 commit e79dc63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 2 additions & 7 deletions docs/reference/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ version_xml = configure_file(
output: 'version.xml',
configuration: conf)

# HACK: need to find valac'ed umockdev.c for gtk-doc; https://github.com/mesonbuild/meson/issues/3892
# this isn't predictable between meson versions
umockdev_c = run_command('sh', '-ec', 'find -name umockdev.c| xargs dirname').stdout().strip()
umockdev_ioctl_c = run_command('sh', '-ec', 'find -name umockdev-ioctl.c| xargs dirname').stdout().strip()

gnome = import('gnome')
gnome.gtkdoc('umockdev',
main_xml: 'umockdev-docs.xml',
src_dir: [meson.build_root(), umockdev_c, umockdev_ioctl_c],
src_dir: [meson.build_root()],
content_files: [version_xml],
gobject_typesfile: 'umockdev.types',
ignore_headers: ['uevent_sender.h', 'ioctl_tree.h', 'debug.h'],
scan_args: ['--rebuild-types'],
dependencies: [glib, gobject, declare_dependency(link_with : [umockdev_lib])],
install: true,
)
4 changes: 4 additions & 0 deletions docs/reference/umockdev.types
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
umockdev_ioctl_base_get_type
umockdev_ioctl_client_get_type
umockdev_ioctl_data_get_type
umockdev_testbed_get_type

0 comments on commit e79dc63

Please sign in to comment.