]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: add build-prlimit option
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 29 Apr 2026 11:48:00 +0000 (13:48 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Tue, 12 May 2026 11:47:20 +0000 (13:47 +0200)
Allow the build of the target to be disabled by the user and also enable
the addition of platform restrictions.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
meson.build
meson_options.txt

index d518a4aa94c536938f7467252652a63d410b2a44..ef9398468eac47edca98078a656816dae5ff1521 100644 (file)
@@ -1916,6 +1916,7 @@ if opt and not is_disabler(exe)
   bashcompletions += ['zramctl']
 endif
 
+opt = get_option('build-prlimit').allowed()
 exe = executable(
   'prlimit',
   prlimit_sources,
@@ -1923,8 +1924,9 @@ exe = executable(
   link_with : [lib_common,
                lib_smartcols],
   install_dir : usrbin_exec_dir,
-  install : true)
-if not is_disabler(exe)
+  install : opt,
+  build_by_default : opt)
+if opt and not is_disabler(exe)
   exes += exe
   manadocs += prlimit_manadocs
   bashcompletions += ['prlimit']
index d90a4b99dd1445ec86241c186ca0befaf75b036f..8e23ee76e75bc5b0e8a512e891f1853619a2b6ed 100644 (file)
@@ -263,6 +263,8 @@ option('build-getino', type : 'feature',
        description : 'build getino')
 option('build-copyfilerange', type : 'feature',
        description : 'build copyfilerange')
+option('build-prlimit', type : 'feature',
+       description : 'build prlimit')
 
 # static programs