]> 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>
Thu, 25 Apr 2024 12:30:54 +0000 (07:30 -0500)
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
(cherry picked from commit 6549a90cb9d3f6c0a4a3fc7e87536b5e4690517a)

meson.build
meson_options.txt

index 801f2890673c8afd41ce70e579ba53edc23fb4dd..60cdc40cde36a7a95fef511350f6e808de4be088 100644 (file)
@@ -1564,15 +1564,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 862df4e91769160a696e5478ec2e77ff088896f2..930e96bd3a13d3ddac1ffde575974949e900a4e3 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',