Open nirbheek opened 6 years ago
We added the depends:
kwarg to test()
for similar reasons.
If the purpose of a depends kwarg is for handling runtime use, we do NOT want the same semantics as the depends:
kwarg from custom_target, because that triggers rebuilding the target, whereas this proposal is only to cover order-only dependencies that ensures it is "also-built".
It sounds like the real objective here is an alias_target('make-my_exe-work', my_exe, my_generated_file)
which can be run before entering meson devenv
to guarantee that my_exe does sane things when run from a devenv?
If we assume the "for example"s aren't representative of the issue, but just look at "hard to understand what adding random text files as sources does", then perhaps there is still a reason to do this. idk.
Currently, a build target can depend on other targets in the following ways:
dependencies:
andlink_*:
to depend on built libraries and shared modules(2) has the following problems:
.c
file at runtime and you do not want it linked into the target.execve()
on a helper executable from inside your library or executable.Solution: add a
depends:
kwarg that behaves the same way that thedepends:
kwarg oncustom_target()
behaves.We should also deprecate the add-to-sources magic and start printing warnings about unknown sources.