build: Fix gresource.xml dependencies generation
Submitted by ast..@..pso.at
Created attachment 356828 build: Fix gresource.xml dependencies generation
shell/Makefile.am was supposed to automatically generate a set of
dependencies for the sources produced from evince.gresource.xml (by way
glib-compile-resources --generate-dependencies). However, the
current implementation was broken (on GNU Make, at least). It tried to
prereq1: $(other_stuff_here) ... target: prereq1 $(shell filter prereq1) ...
Where "filter" is a program that takes "prereq1" and produces a list of additional prerequisites for "target".
Apparently the intention was for "prereq1" to be updated first, and
then, once "prereq1" has been generated or updated, for "filter" to read
it. But this doesn't work: first, because the expansion for
$(shell ...) happens at the time the rule is parsed; second, because even if the
expansion did occur after the previous prerequisites were updated, it
would still be broken when using parallel recipe execution (
The implementation in this patch uses a common make pattern instead: include an auto-generated makefile snippet.
Another problem with the code was that it placed the generated files in the source directory instead of the build directory. This was also fixed.
Patch 356828, "build: Fix gresource.xml dependencies generation":
Version: git master