From b75c6c3c3fca9e64e8a002fb5e12c00241660abd Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 5 May 2025 17:00:24 +0200 Subject: [PATCH] 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. --- src/basic/meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/basic/meson.build b/src/basic/meson.build index a99f198a97..7cc29bd039 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -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