Skip to content

Commit 07892da

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d4cd75f commit 07892da

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

contrib/meson.build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
subdir('completion')
1+
foreach feature : get_option('contrib')
2+
subdir(feature)
3+
endforeach

meson_options.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ option('version', type: 'string', value: '',
2727
description: 'Version string reported by git-version(1) and other tools.')
2828

2929
# Features supported by Git.
30+
option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ],
31+
description: 'Contributed features to include.')
3032
option('curl', type: 'feature', value: 'enabled',
3133
description: 'Build helpers used to access remotes with the HTTP transport.')
3234
option('expat', type: 'feature', value: 'enabled',

0 commit comments

Comments
 (0)