[Spice-commits] doc/reference

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 29 10:44:03 UTC 2019


 doc/reference/meson.build |   29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

New commits:
commit a73b59b327d81ccb8723567d9c21979f671235b0
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Jan 16 16:13:30 2019 +0400

    meson: improve gtk-doc build
    
    - 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 at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/doc/reference/meson.build b/doc/reference/meson.build
index a121e66..c1abeb9 100644
--- a/doc/reference/meson.build
+++ b/doc/reference/meson.build
@@ -38,14 +38,31 @@ 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"',
+               join_paths(meson.build_root(), 'src', 'spice-version.h')
+             ],
+             src_dir : join_paths(meson.source_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')),
+             ],
+            )


More information about the Spice-commits mailing list