From: Jordan Williams Date: Mon, 22 Apr 2024 14:03:52 +0000 (-0500) Subject: meson: Add build-rtcwake option X-Git-Tag: v2.42-start~379^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa907a8810d9a0e7049a01828e2dd0d53567cf0a;p=thirdparty%2Futil-linux.git meson: Add build-rtcwake option Signed-off-by: Jordan Williams --- diff --git a/meson.build b/meson.build index aa4ed8b81..90c71b49e 100644 --- a/meson.build +++ b/meson.build @@ -1651,16 +1651,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 8a11cd8e1..42469fa67 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',