Add meson build option to prevent building kernel-install

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>
This commit is contained in:
Jakov Smolic 2020-04-11 14:32:52 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 3cfb7cc507
commit 5fa5c3e2d0
2 changed files with 16 additions and 10 deletions

View 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')

View File

@ -1,14 +1,18 @@
# SPDX-License-Identifier: LGPL-2.1+
install_data('kernel-install',
install_mode : 'rwxr-xr-x',
install_dir : bindir)
want_kernel_install = get_option('kernel-install')
install_data('00-entry-directory.install',
'50-depmod.install',
'90-loaderentry.install',
install_mode : 'rwxr-xr-x',
install_dir : kernelinstalldir)
if want_kernel_install
install_data('kernel-install',
install_mode : 'rwxr-xr-x',
install_dir : bindir)
meson.add_install_script('sh', '-c',
mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))
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