diff options
author | Jordan Williams <jordan@jwillikers.com> | 2024-04-22 08:46:55 -0500 |
---|---|---|
committer | Jordan Williams <jordan@jwillikers.com> | 2024-04-22 08:46:55 -0500 |
commit | cd8fd8a1e23b39f6cb069a4829cf2ecc497c8e1c (patch) | |
tree | 9a3ec64da15ac94fe216a7de53f882d04c7b9890 | |
parent | 60546acc885243c94a7aa95e00e9105fa88a8fe6 (diff) | |
download | util-linux-cd8fd8a1e23b39f6cb069a4829cf2ecc497c8e1c.tar.gz |
meson: Add build-blkpr option
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
-rw-r--r-- | meson.build | 18 | ||||
-rw-r--r-- | meson_options.txt | 2 |
2 files changed, 12 insertions, 8 deletions
diff --git a/meson.build b/meson.build index 5b4f59b8c3..fb895a8d92 100644 --- a/meson.build +++ b/meson.build @@ -1610,14 +1610,16 @@ if cc.has_header('linux/blkzoned.h') bashcompletions += ['blkzone'] endif -if cc.has_header('linux/pr.h') - exe = executable( - 'blkpr', - blkpr_sources, - include_directories : includes, - link_with : [lib_common], - install_dir : sbindir, - install : true) +opt = get_option('build-blkpr').require(cc.has_header('linux/pr.h')).allowed() +exe = executable( + 'blkpr', + blkpr_sources, + include_directories : includes, + link_with : [lib_common], + install_dir : sbindir, + install : opt, + build_by_default : opt) +if opt and not is_disabler(exe) exes += exe manadocs += ['sys-utils/blkpr.8.adoc'] endif diff --git a/meson_options.txt b/meson_options.txt index ca76530a93..2de75784f9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -141,6 +141,8 @@ option('build-fstrim', type : 'feature', description : 'build fstrim') option('build-dmesg', type : 'feature', description : 'build dmesg') +option('build-blkpr', type : 'feature', + description : 'build blkpr') option('build-kill', type : 'feature', description : 'build kill') option('build-last', type : 'feature', |