[PATCH 23.07 2/2] build: explicitly track file paths in current directory

Bruce Richardson bruce.richardson at intel.com
Fri Mar 10 12:11:38 CET 2023


To ensure proper path tracking for files being used by the build, the
"files()" function should always be used. While meson currently assumes
that bare filenames passed to commands refer to paths in the current
directory, other reimplementations of meson, e.g. muon, require the
paths to be properly tracked. Therefore, for resiliency, ensure all
paths are specified using "files()".

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 app/test/meson.build              | 2 +-
 buildtools/pkg-config/meson.build | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 2db5ccf4ff..94233fafca 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -470,7 +470,7 @@ dpdk_test = executable('dpdk-test',
              driver_install_path),
         install: true)

-has_hugepage = run_command(py3, 'has_hugepage.py', check: true).stdout().strip() != '0'
+has_hugepage = run_command(py3, files('has_hugepage.py'), check: true).stdout().strip() != '0'
 message('hugepage availability: @0@'.format(has_hugepage))

 # some perf tests (eg: memcpy perf autotest)take very long
diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
index 0412883c8f..b36add17e3 100644
--- a/buildtools/pkg-config/meson.build
+++ b/buildtools/pkg-config/meson.build
@@ -56,4 +56,4 @@ This is required for a number of static inline functions in the public headers.'

 # For static linking with dependencies as shared libraries,
 # the internal static libraries must be flagged explicitly.
-run_command(py3, 'set-static-linker-flags.py', check: true)
+run_command(py3, files('set-static-linker-flags.py'), check: true)
--
2.37.2



More information about the dev mailing list