aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Williams <jordan@jwillikers.com>2024-04-22 11:06:48 -0500
committerJordan Williams <jordan@jwillikers.com>2024-04-24 15:30:30 -0500
commit236918fcc6d886270e8585cbc594ac71c24b1951 (patch)
tree4e318acb087f9847c4cc1b9e5e313d456d44edc3
parent8c917cf8a054058b261c7b02699b017443dbb501 (diff)
downloadutil-linux-236918fcc6d886270e8585cbc594ac71c24b1951.tar.gz
meson: Add build-script option
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
-rw-r--r--meson.build18
-rw-r--r--meson_options.txt2
2 files changed, 14 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index feca474ca7..69cdc7c616 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 39ff026cee..b993de7f09 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')