From: Karel Zak Date: Tue, 4 Jan 2022 11:17:41 +0000 (+0100) Subject: meson: keep bash-completion symlinks in variable X-Git-Tag: v2.38-rc1~77 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa519054ecfc9fd0d51d8f43328fecc4babdb05c;p=thirdparty%2Futil-linux.git meson: keep bash-completion symlinks in variable This is small consolidation, let's call meson_make_symlink from one place in loop. Addresses: https://github.com/util-linux/util-linux/pull/1549 Signed-off-by: Karel Zak --- diff --git a/meson.build b/meson.build index dced67076d..be02e71fd0 100644 --- a/meson.build +++ b/meson.build @@ -753,7 +753,9 @@ add_project_arguments('-include', 'config.h', language : 'c') manadocs = [] manlinks = {} + bashcompletions = [] +bashcompletionslinks = {} subdir('include') subdir('lib') @@ -847,6 +849,7 @@ if opt and not is_disabler(exe) manadocs += ['login-utils/last.1.adoc'] manlinks += {'lastb.1': 'last.1'} bashcompletions += ['last'] + bashcompletionslinks += {'lastb': 'last'} endif opt = not get_option('build-nologin').disabled() @@ -977,11 +980,7 @@ exe = executable( if opt and not is_disabler(exe) exes += exe manadocs += ['login-utils/runuser.1.adoc'] - if bash_completion.found() - meson.add_install_script(meson_make_symlink, - 'su', - join_paths(bash_completion.get_variable('completionsdir'), 'runuser')) -endif + bashcompletionslinks += {'runuser': 'su'} endif ############################################################ @@ -3234,4 +3233,9 @@ if bash_completion.found() install_dir : bash_completion.get_variable('completionsdir') ) endforeach + foreach link_name, target : bashcompletionslinks + meson.add_install_script(meson_make_symlink, + target, + join_paths(bash_completion.get_variable('completionsdir'), link_name)) + endforeach endif