]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Add meson build option to prevent building kernel-install
authorJakov Smolic <jakov.smolic@sartura.hr>
Sat, 11 Apr 2020 12:32:52 +0000 (14:32 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 14 Apr 2020 18:22:32 +0000 (20:22 +0200)
This commit introduces new meson build option "kernel-install" to prevent kernel-install from building if the user
sets the added option as "false".
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
meson_options.txt
src/kernel-install/meson.build

index d1c752fda2f2dca81f92ffe323c2ba748210eb34..3962565091f49dddece71dca30c24520842369ee 100644 (file)
@@ -354,3 +354,5 @@ option('oss-fuzz', type : 'boolean', value : 'false',
        description : 'build against oss-fuzz')
 option('llvm-fuzz', type : 'boolean', value : 'false',
        description : 'build against LLVM libFuzzer')
+option('kernel-install', type: 'boolean', value: 'true',
+       description : 'include kernel-install feature')
index 261c3aaae450199a3d238af96b4bae9f2c1473ca..9ae342dfba87b3d5c1798e5d7edc29ed82693499 100644 (file)
@@ -1,14 +1,18 @@
 # SPDX-License-Identifier: LGPL-2.1+
 
-install_data('kernel-install',
-             install_mode : 'rwxr-xr-x',
-             install_dir : bindir)
-
-install_data('00-entry-directory.install',
-             '50-depmod.install',
-             '90-loaderentry.install',
-             install_mode : 'rwxr-xr-x',
-             install_dir : kernelinstalldir)
-
-meson.add_install_script('sh', '-c',
-                         mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))
+want_kernel_install = get_option('kernel-install')
+
+if want_kernel_install
+       install_data('kernel-install',
+               install_mode : 'rwxr-xr-x',
+               install_dir : bindir)
+
+       install_data('00-entry-directory.install',
+               '50-depmod.install',
+               '90-loaderentry.install',
+               install_mode : 'rwxr-xr-x',
+               install_dir : kernelinstalldir)
+
+       meson.add_install_script('sh', '-c',
+                               mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))
+endif