From: Jordan Williams Date: Mon, 22 Apr 2024 14:03:52 +0000 (-0500) Subject: meson: Add build-rtcwake option X-Git-Tag: v2.40.1-rc1~9^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=131c53f58d580a0c4e69ed3afaa7d534628000d4;p=thirdparty%2Futil-linux.git meson: Add build-rtcwake option Signed-off-by: Jordan Williams (cherry picked from commit fa907a8810d9a0e7049a01828e2dd0d53567cf0a) --- diff --git a/meson.build b/meson.build index 3f0694392..77b16a25a 100644 --- a/meson.build +++ b/meson.build @@ -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', diff --git a/meson_options.txt b/meson_options.txt index 87da0fd2e..1cbe16844 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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',