build: fix install from any directory with Meson 0.55
authorDmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tue, 10 Aug 2021 23:03:22 +0000 (02:03 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 27 Aug 2021 19:42:25 +0000 (21:42 +0200)
Install command on Windows for Meson >= 0.55.0 referenced the script
by a plain string, assuming the build directory to be directly under
the source tree root.
This resulted in an error when the assumption did not hold:

    c:\python\python.exe: can't open file
    '../buildtools/symlink-drivers-solibs.py':
    [Errno 2] No such file or directory

Use files() to make a valid script path for any build directory.

Fixes: cd27047dbee1 ("build: support drivers symlink on Windows")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Nick Connolly <nick.connolly@mayadata.io>
config/meson.build

index e804210..3b5966e 100644 (file)
@@ -61,7 +61,8 @@ if not is_windows
             get_option('libdir'), pmd_subdir_opt)
 elif meson.version().version_compare('>=0.55.0')
     # 0.55.0 is required to use external program with add_install_script
-    meson.add_install_script(py3, '../buildtools/symlink-drivers-solibs.py',
+    meson.add_install_script(py3,
+            files('../buildtools/symlink-drivers-solibs.py'),
             get_option('libdir'), pmd_subdir_opt, get_option('bindir'))
 endif