[PATCH v2 2/2] build: use meson fs.relative_to for making relative symlinks
Zach DeCook
zachdecook at librem.one
Sat Jun 15 13:12:44 CEST 2024
-r flag is not supported by e.g. busybox
---
src/py/libcamera/meson.build | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
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)
--
2.45.2
More information about the libcamera-devel
mailing list