meson: absolute paths to ${builddir} included in gtk-doc HTML
I tried building GLib 2.58.1 Debian packages (with a backport of @xclaesse's fixes for #1527 (closed)) with both Autotools and Meson, and running diffoscope on the results (if you do this, you'll want to use --exclude-command objdump --exclude-command readelf
to avoid spending a long time analyzing some uninteresting differences).
The Meson build uses:
cd debian/build/deb && LC_ALL=C.UTF-8 meson ../../.. --wrap-mode=nodownload --buildtype=plain --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=lib/x86_64-linux-gnu --libexecdir=lib/x86_64-linux-gnu --libexecdir=lib/glib2.0 -Dinternal_pcre=false --default-library both -Dinstalled_tests=true -Dlibmount=true -Dman=true -Dselinux=true -Dsystemtap=true -Dxattr=true -Dgtk_doc=true
...
Source dir: /srv/tmp/smcv/build-area/glib2.0-2.58.1
Build dir: /srv/tmp/smcv/build-area/glib2.0-2.58.1/debian/build/deb
where /srv/tmp/smcv/build-area/glib2.0-2.58.1
is my unpacked GLib source code.
I noticed that when the gtk-doc-generated HTML includes a cross-reference between two of the libraries (for example GIO referencing g_object_unref()
in GObject, or GObject referencing gboolean
in GLib), the cross-reference gets written in as an absolute path. This is a regression when compared with Autotools, in which the paths are relative:
│ │ │ │ -<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
│ │ │ │ +<a href="/srv/tmp/smcv/build-area/glib2.0-2.58.1/debian/build/deb/docs/reference/gio/../glib/html/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
The absolute paths will not work when the packages are installed on someone else's system, or after I have deleted the temporary copy of the GLib source code that I built.