Skip to content

Commit 6dd7a29

Browse files
q66aperezdc
authored andcommitted
platform: fix compatibility with ln(1) without relative support
(cherry picked from commit 0e5992a)
1 parent 44f669f commit 6dd7a29

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

platform/meson.build

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@ fs_mod = import('fs')
1717
ln_exe = find_program('ln', native: true)
1818
platform_plugin_symlinks = []
1919
foreach platform_plugin : platform_plugin_targets
20+
inp_fp = platform_plugin.full_path()
21+
inp_name = fs_mod.name(inp_fp)
22+
rel_inp = fs_mod.name(fs_mod.parent(inp_fp)) / inp_name
2023
platform_plugin_symlinks += [
2124
custom_target(
22-
'link-@0@'.format(fs_mod.name(platform_plugin.full_path()).underscorify()),
23-
output: fs_mod.name(platform_plugin.full_path()),
25+
'link-@0@'.format(inp_name.underscorify()),
26+
output: inp_name,
2427
input: platform_plugin,
25-
command: [ln_exe, '-srnf', '@INPUT@', '@OUTPUT@'],
28+
command: [ln_exe, '-sf', rel_inp, '@OUTPUT@'],
2629
build_by_default: true,
2730
)
2831
]

0 commit comments

Comments
 (0)