From: Jordan Williams Date: Mon, 22 Apr 2024 16:06:48 +0000 (-0500) Subject: meson: Add build-script option X-Git-Tag: v2.42-start~379^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=236918fcc6d886270e8585cbc594ac71c24b1951;p=thirdparty%2Futil-linux.git meson: Add build-script option Signed-off-by: Jordan Williams --- diff --git a/meson.build b/meson.build index feca474ca..69cdc7c61 100644 --- a/meson.build +++ b/meson.build @@ -2511,6 +2511,7 @@ endif ############################################################ +opt = get_option('build-script').require(have_pty).allowed() exe = executable( 'script', script_sources, @@ -2521,10 +2522,13 @@ exe = executable( realtime_libs, math_libs], install_dir : usrbin_exec_dir, - install : true) -exes += exe -manadocs += ['term-utils/script.1.adoc'] -bashcompletions += ['script'] + install : opt, + build_by_default : opt) +if opt and not is_disabler(exe) + exes += exe + manadocs += ['term-utils/script.1.adoc'] + bashcompletions += ['script'] +endif exe = executable( 'test_script', @@ -2536,8 +2540,10 @@ exe = executable( lib_utempter, realtime_libs, math_libs], - build_by_default : program_tests) -exes += exe + build_by_default : opt and program_tests) +if opt and not is_disabler(exe) + exes += exe +endif exe = executable( 'scriptlive', diff --git a/meson_options.txt b/meson_options.txt index 39ff026ce..b993de7f0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -69,6 +69,8 @@ option('build-fsck', type : 'feature', description : 'build fsck') option('build-partx', type : 'feature', description : 'build addpart, delpart, partx') +option('build-script', type : 'feature', + description : 'build script') option('build-uuidd', type : 'feature', description : 'build the uuid daemon')