diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-01-17 10:56:06 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-01-17 09:56:38 -0800 |
| commit | 07892da045c51eb97ad77aabe1ae4c34170ab3b4 (patch) | |
| tree | 7bd445921bb632ad649c5585151db098fb4af838 | |
| parent | d4cd75f6bd592e733c3e5b1607aaed991e93902f (diff) | |
| download | git-07892da045c51eb97ad77aabe1ae4c34170ab3b4.tar.gz | |
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>
| -rw-r--r-- | contrib/meson.build | 4 | ||||
| -rw-r--r-- | meson_options.txt | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/contrib/meson.build b/contrib/meson.build index a7b77b87c2..d74b64a518 100644 --- a/contrib/meson.build +++ b/contrib/meson.build @@ -1 +1,3 @@ -subdir('completion') +foreach feature : get_option('contrib') + subdir(feature) +endforeach diff --git a/meson_options.txt b/meson_options.txt index f50bb40cdf..4f02c92524 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -27,6 +27,8 @@ option('version', type: 'string', value: '', description: 'Version string reported by git-version(1) and other tools.') # Features supported by Git. +option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ], + description: 'Contributed features to include.') option('curl', type: 'feature', value: 'enabled', description: 'Build helpers used to access remotes with the HTTP transport.') option('expat', type: 'feature', value: 'enabled', |
