From 30ec2eaef5f1e3c6639304316a12bf01a5cd7150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 16 Nov 2022 15:52:47 +0100 Subject: meson,ukify: hook up ukify, add --version option The option is added because we have a similar one for kernel-install. This program requires python, and some people might want to skip it because of this. The tool is installed in /usr/lib/systemd for now, since the interface might change. A template file is used, but there is no .in suffix. The problem is that we'll later want to import the file as a module for tests, but recent Python versions make it annoyingly hard to import a module from a file without a .py suffix. imp.load_sources() works, but it is deprecated and throws warnings. importlib.machinery.SourceFileLoader().load_module() works, but is also deprecated. And the documented replacements are a maze of twisted little callbacks that result in an empty module. So let's take the easy way out, and skip the suffix which makes it easy to import the template as a module after adding the directory to sys.path. --- meson_options.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meson_options.txt') diff --git a/meson_options.txt b/meson_options.txt index 19e9c2d990..6a95955dd9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -501,6 +501,8 @@ option('llvm-fuzz', type : 'boolean', value : false, description : 'build against LLVM libFuzzer') option('kernel-install', type: 'boolean', value: true, description : 'install kernel-install and associated files') +option('ukify', type : 'combo', choices : ['auto', 'true', 'false'], + description : 'install ukify') option('analyze', type: 'boolean', value: true, description : 'install systemd-analyze') -- cgit v1.2.1