meson: use files in run_command with relativized path
authorEli Schwartz <eschwartz93@gmail.com>
Wed, 27 Jul 2022 01:09:07 +0000 (21:09 -0400)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 30 Jul 2022 04:58:22 +0000 (13:58 +0900)
commit6c8892828c0970bb51639923e5b3483c7707e9ca
tree6641524ebb3cf6938cd0825cc6e3dbfa07546899
parent64a42770064fac0d05892dfc5b3f105680677afd
meson: use files in run_command with relativized path

Passing a file as a command argument in string form assumes that
run_command has the current subdir as its cwd, but Meson's documentation
*explicitly* calls this out as undefined and wrong to use.

Indeed, muon has a different implementation that uses a different cwd,
and this argument cannot be found. Instead, passing a files() object
means that it's the job of meson itself to verify the file exists, then
pass it to the run_command in some format that guarantees it is a valid
path reference.
src/basic/meson.build