]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: Add build-fsfreeze option
authorJordan Williams <jordan@jwillikers.com>
Wed, 24 Apr 2024 20:29:08 +0000 (15:29 -0500)
committerJordan Williams <jordan@jwillikers.com>
Wed, 24 Apr 2024 20:29:08 +0000 (15:29 -0500)
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
meson.build
meson_options.txt

index 1a071b6883ea5196c7b78e1ee2741b205acddfa8..466689fd8713f6372995253261bd7283ef5026ae 100644 (file)
@@ -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',
index e70b22c56c11c3c5e40cae6eacc4cf834094be10..b057d8426d1576cdbc3f19fab44974d542c4e73b 100644 (file)
@@ -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',