meson: introduce build option for contrib

We unconditionally wire up building command completion present in the
"contrib/" directory. This may or may not be what users want, and we
don't provide a way to disable it.

Introduce a new "contrib" build option. This option is introduced as an
array so that users can manually pick which exact features they want to
include from the "contrib" directory. By default, we build and install
shell completions, which is a commonly used feature and also the current
default.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-01-17 10:56:06 +01:00
committed by Junio C Hamano
parent d4cd75f6bd
commit 07892da045
2 changed files with 5 additions and 1 deletions

View File

@ -1 +1,3 @@
subdir('completion')
foreach feature : get_option('contrib')
subdir(feature)
endforeach