diff options
author | wael <wael40663@gmail.com> | 2023-11-20 06:20:56 +0000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2023-11-20 06:20:56 +0000 |
commit | 57239f5db872d5ad942858a33d7daead60fb828a (patch) | |
tree | 2887044c6caeb7f2e2a7163225519f186d0f43fa /rules | |
parent | 1e3b3592313ab415f1a821a401b278fe09dfd6f5 (diff) |
meson: use builtin install_symlink
use the builtin `install_symlink` target provided by meson instead of providing on external `ln` and `sh`.
Diffstat (limited to 'rules')
-rw-r--r-- | rules/meson.build | 14 |
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. |