Skip to content

Commit

Permalink
platform: fix compatibility with ln(1) without relative support
Browse files Browse the repository at this point in the history
(cherry picked from commit 0e5992a)
  • Loading branch information
q66 authored and aperezdc committed Apr 9, 2024
1 parent 44f669f commit 6dd7a29
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions platform/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ fs_mod = import('fs')
ln_exe = find_program('ln', native: true)
platform_plugin_symlinks = []
foreach platform_plugin : platform_plugin_targets
inp_fp = platform_plugin.full_path()
inp_name = fs_mod.name(inp_fp)
rel_inp = fs_mod.name(fs_mod.parent(inp_fp)) / inp_name
platform_plugin_symlinks += [
custom_target(
'link-@0@'.format(fs_mod.name(platform_plugin.full_path()).underscorify()),
output: fs_mod.name(platform_plugin.full_path()),
'link-@0@'.format(inp_name.underscorify()),
output: inp_name,
input: platform_plugin,
command: [ln_exe, '-srnf', '@INPUT@', '@OUTPUT@'],
command: [ln_exe, '-sf', rel_inp, '@OUTPUT@'],
build_by_default: true,
)
]
Expand Down

0 comments on commit 6dd7a29

Please sign in to comment.