[Spice-devel] [PATCH spice-gtk 01/12] meson: improve gtk-doc build

Marc-André Lureau marcandre.lureau at gmail.com
Thu Feb 14 10:38:18 UTC 2019


Hi

On Mon, Feb 11, 2019 at 6:16 PM Frediano Ziglio <fziglio at redhat.com> wrote:
>
> > >
> > > From: Marc-André Lureau <marcandre.lureau at redhat.com>
> > >
> > > - 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 :)
> > >
> >
> > This last sentence is not related to this commit.

Kind of related, since I wanted to use this as part of gtkdoc build
improvements. It's a soft FIXME reminder.

> >
> > > Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
> > > ---
> > >  doc/reference/meson.build | 29 +++++++++++++++++++++++------
> > >  1 file changed, 23 insertions(+), 6 deletions(-)
> > >
> > > 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')
>
> Why do you need to pass spice-version.h? It's not passed in autoconf files.
> Looks like autoconf is adding all src directory but ignoring lot of files.
> But autoconf does not need to include explicitly spice-version.h

It fixes

./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.

I have no interest in fixing both autotools & meson, as I want to drop
autotools asap.

This is not critical or a regression, feel free to fix autotools too

>
> > > +             ],
> > > +             src_dir : join_paths(meson.source_root(), 'src'),
> >
> > These last lines were changed since previous version.
> > What's the reason?
> >
> > > +             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')),
> > > +             ],
>
> In my machine autoconf is just calling:
>
> gtkdoc-fixxref --module=spice-gtk --module-dir=html --html-dir=/home/fziglio/install/share/gtk-doc/html
>
> why do you need all these extra directories?

They allow inter-links with all these APIs docs. Check the generated doc.

Thanks

>
> > > +            )
> >
>
> Frediano
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau


More information about the Spice-devel mailing list