Skip to content

girepository: Correct --c-include arguments for GIO Unix/Windows headers

Simon McVittie requested to merge wip/smcv/issue3564 into main

The deprecated construct '@0@'.format(h) (where h is a file object) expanded to the filename relative to the project root, which in this particular case happens to be what we wanted: --c-include=gio/gunixmounts.h resulted in a recommendation to #include <gio/gunixmounts.h> and so on. Replacing it with h.full_path() resulted in GIR XML and documentation that recommended constructs like #include </home/me/src/glib/gio/gunixmounts.h>, which is not what was intended (and caused new differences between different architectures' Gio-2.0.gir on multiarch systems, which is how I discovered this).

Hard-coding gio/ and appending the basename of the header seems like the simplest non-deprecated spelling that will do what we wanted.

Fixes: 51e3e7d9 "build: Bump Meson dependency to 1.4.0"
Resolves: #3564 (closed)

/cc @bgilbert

Merge request reports

Loading