From 4670f4b85151e847f17fbcc3e2cd619ebd09440b Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 2 Sep 2024 18:58:35 +0100 Subject: [PATCH] meson: allow disabling the bash completion For the cases where you don't want (or cannot) install it. For example, I've seen similar requests from the Nix people. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/86 Signed-off-by: Lucas De Marchi --- meson.build | 10 ++++++---- meson_options.txt | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index edfaa0d2..2e39e6c4 100644 --- a/meson.build +++ b/meson.build @@ -192,10 +192,12 @@ if bashcompletiondir == '' endif endif -install_data( - files('shell-completion/bash/kmod'), - install_dir : bashcompletiondir, -) +if bashcompletiondir != 'no' + install_data( + files('shell-completion/bash/kmod'), + install_dir : bashcompletiondir, + ) +endif #------------------------------------------------------------------------------- # Compression support diff --git a/meson_options.txt b/meson_options.txt index 0153d0b4..086fbb39 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -15,7 +15,7 @@ option( option( 'bashcompletiondir', type : 'string', - description : 'Bash completions directory.', + description : 'Bash completions directory. Use "no" to disable.', ) # Compression options -- 2.47.3