summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwael <wael40663@gmail.com>2023-11-20 06:20:56 +0000
committerPeter Hutterer <peter.hutterer@who-t.net>2023-11-20 06:20:56 +0000
commit57239f5db872d5ad942858a33d7daead60fb828a (patch)
tree2887044c6caeb7f2e2a7163225519f186d0f43fa
parent1e3b3592313ab415f1a821a401b278fe09dfd6f5 (diff)
meson: use builtin install_symlink
use the builtin `install_symlink` target provided by meson instead of providing on external `ln` and `sh`.
-rw-r--r--rules/meson.build14
1 files changed, 10 insertions, 4 deletions
diff --git a/rules/meson.build b/rules/meson.build
index 48fd0c60..ea1c22ca 100644
--- a/rules/meson.build
+++ b/rules/meson.build
@@ -166,10 +166,16 @@ foreach ruleset: ['base', 'evdev']
endforeach
if get_option('xorg-rules-symlinks')
- foreach suffix: ['', '.lst', '.xml']
- meson.add_install_script('sh', '-c',
- 'ln -s base@0@ $DESTDIR@1@/xorg@0@'.format(suffix, dir_xkb_rules))
- endforeach
+ foreach suffix: ['', '.lst', '.xml']
+ if meson.version().version_compare('>= 0.61')
+ install_symlink('xorg' + suffix,
+ pointing_to: 'base' + suffix,
+ install_dir: dir_xkb_rules)
+ else
+ meson.add_install_script('sh', '-c',
+ 'ln -s base@0@ $DESTDIR@1@/xorg@0@'.format(suffix, dir_xkb_rules))
+ endif
+ endforeach
endif
# Copy the DTD to the build directory, the man page generation expects it in
# the same directory as the input XML file.