[v2,2/2] build: use meson fs.relative_to for making relative symlinks
diff mbox series

Message ID 20240615111244.4573-2-zachdecook@librem.one
State New
Headers show
Series
  • [v2,1/2] dirty version string: Don't use non-posix arguments for date date will output a date like 2024-06-05T17:06:30EDT
Related show

Commit Message

Zach DeCook June 15, 2024, 11:12 a.m. UTC
-r flag is not supported by e.g. busybox
---
 src/py/libcamera/meson.build | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build
index 4807ca7d..74c861fc 100644
--- a/src/py/libcamera/meson.build
+++ b/src/py/libcamera/meson.build
@@ -97,12 +97,13 @@  pycamera = shared_module('_libcamera',
 
 # Create symlinks from the build dir to the source dir so that we can use the
 # Python module directly from the build dir.
-
-run_command('ln', '-fsrT', files('__init__.py'),
+relative_target = fs.relative_to(files('__init__.py'), meson.current_build_dir())
+run_command('ln', '-fs', relative_target,
             meson.current_build_dir() / '__init__.py',
             check : true)
 
-run_command('ln', '-fsrT', meson.current_source_dir() / 'utils',
+relative_target = fs.relative_to(meson.current_source_dir() / 'utils', meson.current_build_dir())
+run_command('ln', '-fsT', relative_target,
             meson.current_build_dir() / 'utils',
             check : true)