]> 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>
Thu, 25 Apr 2024 12:30:55 +0000 (07:30 -0500)
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
(cherry picked from commit 236918fcc6d886270e8585cbc594ac71c24b1951)

meson.build
meson_options.txt

index 4429e439aff529550580ba8e1b3c7e1008efaa53..e61e88f6925e979e5f7ae31fd2af1468f9b162c1 100644 (file)
@@ -2457,6 +2457,7 @@ endif
 
 ############################################################
 
+opt = get_option('build-script').require(have_pty).allowed()
 exe = executable(
   'script',
   script_sources,
@@ -2467,10 +2468,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',
@@ -2482,8 +2486,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 ef186db4766886224701280ca51311f1718c4f24..65b43fdb6d145693e3954ee149d396e7b5564a5f 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')