meson: Make sure check-filesystems.sh runs from the build directory

run_command()'s working directory is documented as undefined but it
seems to be the current source directory as when the -ftime-trace
clang option is enabled, -.json is written to src/basic/meson.build
every time meson is run.

Let's make sure the command is executed in the build directory so that
any auxiliary files are written there as well.
This commit is contained in:
Daan De Meyer
2025-05-05 17:09:18 +02:00
parent 0777e64ea2
commit b75c6c3c3f
+7 -1
View File
@@ -244,7 +244,13 @@ filesystem_includes = files(
)
check_filesystems = find_program('check-filesystems.sh')
r = run_command([check_filesystems, cpp, files('filesystems-gperf.gperf')] + filesystem_includes, check: false)
r = run_command(
[
'env', '--chdir', meson.project_build_root(),
check_filesystems, cpp, files('filesystems-gperf.gperf')
] + filesystem_includes,
check: false,
)
if r.returncode() != 0
warning('Unknown filesystems defined in kernel headers:\n\n' + r.stdout())
endif