meson
meson copied to clipboard
gnome.generate_gir never becomes stale
I'm generating a C library via Rust cargo. The header file is written manually and it also contains all the gir annotations.
To run gnome.generate_gir
, I need a library object. I found that this one works for gir
libglycin = library(
'glycin-1',
'include/glycin.h',
dependencies: libglycin_deps,
)
libglycin_gir = gnome.generate_gir(
libglycin,
sources: ['include/glycin.h'],
nsversion: '1',
namespace: 'Gly',
symbol_prefix: 'gly',
link_with: libglycin,
includes: ['Gio-2.0', 'Gtk-4.0'],
header: 'glycin.h',
install: true,
)
However neither the library
nor generate_gir
ever become stale when 'include/glycin.h' changes. The only way I found to regenerate the gir part is via deleting the generated .gir
file. Since both have the header defined as a source, I wonder if at least one of the targets should become stale.
Somewhat fixed by adding the header to link_depends
in the library. However, In my concrete case this causes gir to be regenerated each time after the header has been changed once.
Would it be possible for gnome.generate_gir
to check if the .so
-file of the library and the sources
have changed?
I think it would help to enumerate the multitude of issues that exist here:
- Can't pass a
file
tognome.generate_gir()
. Does the regular command line accept a file? - The generated target, doesn't depend on the symlinked .so, only the versioned one?