"glib-compile-resources --dependency-file=DEPFILE" creates wrong set of dependencies
When I have a resource file foo-res.xml
which contains <file>hello.txt</file>
and I want to compile that resource file and its resources into foo-res.c
, I can have my Makefile
be
include foo-res.c.dep
foo-res.c.dep:
: >> foo-res.c.dep
foo-res.c: foo-res.xml
glib-compile-resources --sourcedir=. --dependency-file=foo-res.c.dep --target=foo-res.c --generate-source foo-res.xml
If I run this build once, the foo-res.c.dep
dep file generated by glib-compile-resources
will look like
foo-res.xml: ./hello.txt
which makes no sense: foo-res.xml
never needs rebuilding, as it is written by a person. And just to verify: When I touch just hello.txt
and then run make
, NOTHING will be rebuilt to update the compiled-in hello.txt
.
I expect the generated foo-res.c.dep
file to look something like
foo-res.c: foo-res.xml hello.txt
so that if hello.txt
changes, the next make
run will actually rebuild foo-res.c
to contain the updated hello.txt
and trigger a compile and a link.
I have put a minimum working example demonstrating the problem at https://gitlab.gnome.org/ndim/BUG-glib-compile-resources-dependency-file