[PATCH spice-gtk] meson: improve gtk-doc build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

- Fix the following warnings:
./spice-gtk-sections.txt:467: warning: No declaration found for SPICE_GTK_CHECK_VERSION.
./spice-gtk-sections.txt:468: warning: No declaration found for SPICE_GTK_MAJOR_VERSION.
./spice-gtk-sections.txt:469: warning: No declaration found for SPICE_GTK_MICRO_VERSION.
./spice-gtk-sections.txt:470: warning: No declaration found for SPICE_GTK_MINOR_VERSION.

- fixxref for glib and gtk (thus requires gtk+ to build doc)

- And other minor simplifications.

After autotools is removed, we should try to use --rebuild-types. For
now I prefer not to touch it :)

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
---
 doc/reference/meson.build | 31 +++++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/doc/reference/meson.build b/doc/reference/meson.build
index a121e66..72fcabe 100644
--- a/doc/reference/meson.build
+++ b/doc/reference/meson.build
@@ -38,14 +38,33 @@ ignore_headers = [
 
 spice_gtk_doc_dep = declare_dependency(link_with : [spice_client_gtk_lib, spice_client_glib_lib])
 
-gnome.gtkdoc('spice-gtk',
-             content_files : ['spice-gtk-overrides.txt', 'spice-gtk-overrides.txt'],
+glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
+glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
+gtk_prefix = dependency('gtk+-3.0').get_pkgconfig_variable('prefix')
+gtk_docpath = join_paths(gtk_prefix, 'share', 'gtk-doc', 'html')
+docpath = join_paths(spice_gtk_datadir, 'gtk-doc', 'html')
+
+gnome.gtkdoc(meson.project_name(),
              dependencies : spice_gtk_doc_dep,
-             main_xml : 'spice-gtk-docs.xml',
-             gobject_typesfile : files('spice-gtk.types'),
+             main_xml : meson.project_name() + '-docs.xml',
+             gobject_typesfile : meson.project_name() + '.types',
              ignore_headers : ignore_headers,
              include_directories: spice_gtk_include,
              c_args : '-DSPICE_COMPILATION',
              install : true,
-             scan_args : ['--deprecated-guards="SPICE_DISABLE_DEPRECATED"', '--ignore-decorators="G_GNUC_INTERNAL"'],
-             src_dir : join_paths(meson.source_root(), 'src'))
+             scan_args : [
+               '--deprecated-guards="SPICE_DISABLE_DEPRECATED"',
+               '--ignore-decorators="G_GNUC_INTERNAL"'
+             ],
+             src_dir : [
+               join_paths(meson.source_root(), 'src'),
+               join_paths(meson.build_root(), 'src'),
+             ],
+             fixxref_args: [
+               '--html-dir=@0@'.format(docpath),
+               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
+               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
+               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
+               '--extra-dir=@0@'.format(join_paths(gtk_docpath, 'gtk3')),
+             ],
+            )
-- 
2.20.1.98.gecbdaf0899

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]