]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
meson: Use short options for ln everywhere
authorHendrik Donner <hd@os-cillation.de>
Mon, 3 Mar 2025 15:13:01 +0000 (16:13 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 4 Mar 2025 15:57:17 +0000 (09:57 -0600)
Some implementations of ln (toybox, busybox) typically only support the
short option format, so use it consistently.

The short options are already used in other places and it's usually
supported on more implementations: -s and -f are POSIX and the few
ln that support --relative understand -r. Which are GNU coreutils,
the Rust uutils coreutils, toybox (-r only) and there is an old
patch for busybox (-r only). The BSDs and MacOS don't seem to
support --relative at all.

Signed-off-by: Hendrik Donner <hd@os-cillation.de>
Link: https://github.com/kmod-project/kmod/pull/303
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
meson.build

index f8f26aee11bd61ae4ac7637cb8ee0111c8796269..4c4c878dd08e6528ad6867ba13c8c4007053bc2a 100644 (file)
@@ -513,7 +513,7 @@ if get_option('tools')
   mkdir_p = 'mkdir -p "$DESTDIR@0@"'
   meson.add_install_script('sh', '-c', mkdir_p.format(sbindir))
 
-  ln_s = 'ln --symbolic --force --relative "$DESTDIR@0@/kmod" "$DESTDIR@1@"'
+  ln_s = 'ln -sfr "$DESTDIR@0@/kmod" "$DESTDIR@1@"'
   foreach tool : _tools
     meson.add_install_script('sh', '-c', ln_s.format(bindir, sbindir / tool))
   endforeach