From: Daan De Meyer Date: Mon, 5 May 2025 15:00:24 +0000 (+0200) Subject: meson: Make sure check-filesystems.sh runs from the build directory X-Git-Tag: v258-rc1~690^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b75c6c3c3fca9e64e8a002fb5e12c00241660abd;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/basic/meson.build b/src/basic/meson.build index a99f198a974..7cc29bd0397 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