From: Jordan Williams Date: Wed, 24 Apr 2024 20:29:08 +0000 (-0500) Subject: meson: Add build-fsfreeze option X-Git-Tag: v2.42-start~379^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6549a90cb9d3f6c0a4a3fc7e87536b5e4690517a;p=thirdparty%2Futil-linux.git meson: Add build-fsfreeze option Signed-off-by: Jordan Williams --- diff --git a/meson.build b/meson.build index 1a071b688..466689fd8 100644 --- a/meson.build +++ b/meson.build @@ -1575,15 +1575,19 @@ exes += exe manadocs += ['sys-utils/ctrlaltdel.8.adoc'] bashcompletions += ['ctrlaltdel'] +opt = get_option('build-fsfreeze').require(conf.get('HAVE_LINUX_FS_H').to_string() == '1').allowed() exe = executable( 'fsfreeze', fsfreeze_sources, include_directories : includes, install_dir : sbindir, - install : true) -exes += exe -manadocs += ['sys-utils/fsfreeze.8.adoc'] -bashcompletions += ['fsfreeze'] + install : opt, + build_by_default : opt) +if opt and not is_disabler(exe) + exes += exe + manadocs += ['sys-utils/fsfreeze.8.adoc'] + bashcompletions += ['fsfreeze'] +endif exe = executable( 'blkdiscard', diff --git a/meson_options.txt b/meson_options.txt index e70b22c56..b057d8426 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-fsfreeze', type : 'feature', + description : 'build fsfreeze') option('build-blkzone', type : 'feature', description : 'build blkzone') option('build-blkpr', type : 'feature',