]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: Add build-script option
authorJordan Williams <jordan@jwillikers.com>
Mon, 22 Apr 2024 16:06:48 +0000 (11:06 -0500)
committerJordan Williams <jordan@jwillikers.com>
Wed, 24 Apr 2024 20:30:30 +0000 (15:30 -0500)
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
meson.build
meson_options.txt

index feca474ca7e6403a47961a7824f722361399e958..69cdc7c616550fed93d294dcd429ab0a4f1e4596 100644 (file)
@@ -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',
index 39ff026ceec352860d7e61a321e0efac9187017e..b993de7f09ed1644b88825fe719d124a800dc9eb 100644 (file)
@@ -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')