]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Make sure check-filesystems.sh runs from the build directory
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 5 May 2025 15:00:24 +0000 (17:00 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 5 May 2025 15:09:18 +0000 (17:09 +0200)
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

index a99f198a974b1a781a1b65e3c304ffeaf7f1df58..7cc29bd0397c682b53e917130717f908baafb8a7 100644 (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