build: Rename variables for consistency and ease of grepping
Names like bash_comp_dir and fish_comp_dir get missed when grepping for 'completion'. Note that the name of the directory is a plural, because it contains lots of completions for many different programs, just like the name of the pkgconfig variable. https://github.com/containers/toolbox/pull/1123 https://github.com/containers/toolbox/pull/1138
This commit is contained in:
parent
c1e238f689
commit
a6fd0db218
2 changed files with 12 additions and 12 deletions
|
@ -1,17 +1,17 @@
|
|||
generate_completions_program = find_program('generate_completions.py')
|
||||
|
||||
if bash_completion.found()
|
||||
bash_comp_dir = bash_completion.get_variable(pkgconfig: 'completionsdir')
|
||||
if bash_completion_dep.found()
|
||||
bashcompletionsdir = bash_completion_dep.get_variable(pkgconfig: 'completionsdir')
|
||||
else
|
||||
bash_comp_dir = get_option('datadir') / 'bash-completion' / 'completions'
|
||||
message('bash-completion not found: using', get_option('prefix') / bash_comp_dir, 'as a falback install directory')
|
||||
bashcompletionsdir = get_option('datadir') / 'bash-completion' / 'completions'
|
||||
message('bash-completion not found: using', get_option('prefix') / bashcompletionsdir, 'as a falback install directory')
|
||||
endif
|
||||
|
||||
if fish.found()
|
||||
fish_comp_dir = fish.get_variable(pkgconfig: 'completionsdir')
|
||||
if fish_dep.found()
|
||||
fishcompletionsdir = fish_dep.get_variable(pkgconfig: 'completionsdir')
|
||||
else
|
||||
fish_comp_dir = get_option('datadir') / 'fish' / 'completions'
|
||||
message('fish not found: using', get_option('prefix') / fish_comp_dir, 'as a fallback install directory')
|
||||
fishcompletionsdir = get_option('datadir') / 'fish' / 'completions'
|
||||
message('fish not found: using', get_option('prefix') / fishcompletionsdir, 'as a fallback install directory')
|
||||
endif
|
||||
|
||||
completion_bash = custom_target('bash-completion',
|
||||
|
@ -19,7 +19,7 @@ completion_bash = custom_target('bash-completion',
|
|||
command: [generate_completions_program, meson.global_source_root() / 'src', 'bash'],
|
||||
depends: [toolbox_go],
|
||||
install: true,
|
||||
install_dir: bash_comp_dir,
|
||||
install_dir: bashcompletionsdir,
|
||||
output: 'toolbox')
|
||||
|
||||
completion_zsh = custom_target('zsh-completion',
|
||||
|
@ -35,5 +35,5 @@ completion_fish = custom_target('fish-completion',
|
|||
command: [generate_completions_program, meson.global_source_root() / 'src', 'fish'],
|
||||
depends: [toolbox_go],
|
||||
install: true,
|
||||
install_dir: fish_comp_dir,
|
||||
install_dir: fishcompletionsdir,
|
||||
output: 'toolbox.fish')
|
||||
|
|
|
@ -18,8 +18,8 @@ go_md2man = find_program('go-md2man')
|
|||
shellcheck = find_program('shellcheck', required: false)
|
||||
skopeo = find_program('skopeo', required: false)
|
||||
|
||||
bash_completion = dependency('bash-completion', required: false)
|
||||
fish = dependency('fish', required: false)
|
||||
bash_completion_dep = dependency('bash-completion', required: false)
|
||||
fish_dep = dependency('fish', required: false)
|
||||
|
||||
migration_path_for_coreos_toolbox = get_option('migration_path_for_coreos_toolbox')
|
||||
profiledir = get_option('profile_dir')
|
||||
|
|
Loading…
Reference in a new issue