From: Jakov Smolic Date: Sat, 11 Apr 2020 12:32:52 +0000 (+0200) Subject: Add meson build option to prevent building kernel-install X-Git-Tag: v246-rc1~591 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fa5c3e2d04622be74d0b7aa199ecdc8a02622fe;p=thirdparty%2Fsystemd.git 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 Signed-off-by: Luka Perkov --- diff --git a/meson_options.txt b/meson_options.txt index d1c752fda2f..3962565091f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') diff --git a/src/kernel-install/meson.build b/src/kernel-install/meson.build index 261c3aaae45..9ae342dfba8 100644 --- a/src/kernel-install/meson.build +++ b/src/kernel-install/meson.build @@ -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