]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: Add build-rtcwake option
authorJordan Williams <jordan@jwillikers.com>
Mon, 22 Apr 2024 14:03:52 +0000 (09:03 -0500)
committerJordan Williams <jordan@jwillikers.com>
Thu, 25 Apr 2024 12:30:55 +0000 (07:30 -0500)
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
(cherry picked from commit fa907a8810d9a0e7049a01828e2dd0d53567cf0a)

meson.build
meson_options.txt

index 3f0694392beaedc9de5aa77775c9f6c5451b6f42..77b16a25a226f57b3b2a4fb2686e30de84cb2e55 100644 (file)
@@ -1640,16 +1640,20 @@ if opt and not is_disabler(exe)
   bashcompletions += ['ldattach']
 endif
 
+opt = get_option('build-rtcwake').require(cc.has_header('linux/rtc.h')).allowed()
 exe = executable(
   'rtcwake',
   rtcwake_sources,
   include_directories : includes,
   link_with : [lib_common],
   install_dir : usrsbin_exec_dir,
-  install : true)
-exes += exe
-manadocs += ['sys-utils/rtcwake.8.adoc']
-bashcompletions += ['rtcwake']
+  install : opt,
+  build_by_default : opt)
+if opt and not is_disabler(exe)
+  exes += exe
+  manadocs += ['sys-utils/rtcwake.8.adoc']
+  bashcompletions += ['rtcwake']
+endif
 
 exe = executable(
   'setarch',
index 87da0fd2e8e42137ba9658bd201b49af4505bcd5..1cbe168444810eeb6276a28f04736d41c62aeca8 100644 (file)
@@ -151,6 +151,8 @@ option('build-blkpr', type : 'feature',
        description : 'build blkpr')
 option('build-ldattach', type : 'feature',
        description : 'build ldattach')
+option('build-rtcwake', type : 'feature',
+       description : 'build rtcwake')
 option('build-kill', type : 'feature',
        description : 'build kill')
 option('build-last', type : 'feature',