]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: do not install standalone binaries if the meson option is disabled
authorLuca Boccassi <luca.boccassi@gmail.com>
Wed, 7 Jan 2026 18:29:02 +0000 (19:29 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 7 Jan 2026 20:58:10 +0000 (05:58 +0900)
A recent commit made the standalone binaries always buildable
on demand, but as a side effect due to how 'meson install' works,
they are always built and installed by 'meson install' even
if the standalone-binaries= option is disabled.
Fix it so that 'meson install' only installs them if the
option is explicitly enabled, while still allowing
building them on demand.

Follow-up for 54492552a1ba96e5160a8e9f867e1c49ffc87bc0

meson.build

index 89f9f0fd695adc2a51ba54f6b1e98b5d00b99449..b657d4fae0d4eab0bc153bb92a3ccad825b0519f 100644 (file)
@@ -2496,7 +2496,7 @@ foreach dict : executables
         foreach key, val : dict
                 if key in ['name', 'dbus', 'public', 'conditions', 'type', 'suite',
                            'timeout', 'parallel', 'objects', 'sources', 'extract',
-                           'include_directories', 'build_by_default']
+                           'include_directories', 'build_by_default', 'install']
                         continue
                 endif
 
@@ -2539,6 +2539,12 @@ foreach dict : executables
         build_by_default = dict.get('build_by_default',
                                     have_standalone_binaries or not is_standalone)
 
+        if not is_standalone
+                install = dict.get('install', true)
+        else
+                install = have_standalone_binaries
+        endif
+
         exe = executable(
                 name,
                 sources : exe_sources,
@@ -2546,6 +2552,7 @@ foreach dict : executables
                 implicit_include_directories : false,
                 include_directories : include_directories,
                 build_by_default: build_by_default,
+                install: install,
         )
 
         executables_by_name += { name : exe }