Open klokik opened 2 weeks ago
This is a well known issue that we've talked about how to handle it, because we don't want to add it to depends, we want to handle it correctly via command.
I had proposed https://github.com/mesonbuild/meson/pull/12287 at one point (now very out of date), but that didn't really move forward.
Generally, whenever .full_path()
is getting called, that's a code smell.
Will handling it via command lead to removal of the depends
parameter?
So far, I find this behavior being inconsistent.
One can put an
external_program
returned by thefind_program()
as a dependency for the custom target only if the program is an executable target that is a part of the built (so it is likely anexe
not anexternal_program
). Unfortunately, you cannot depend on the program found in the PATH.Moreover, I didn't see a clean solution for determining where the program is coming from that covers all the cases. It would be nice to unify the experience and always put the program into the list of dependencies.
Note: it is about the case not covered by auto-added dependencies in the list of the
command
parameters. Consider the following example: