summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-12-08 15:11:18 +0100
committerGitHub <noreply@github.com>2022-12-08 15:11:18 +0100
commita5799902771dd8601dd933afae6cb6b5307a5d0e (patch)
treeab3d9adedec3dffddb368984eac6010d5330d25d /meson.build
parent0254e4d66af7aa893b31b2326335ded5dde48b51 (diff)
parent54c84c8a7a95f73af3a1cd5f53e49abc79244b3f (diff)
downloadsystemd-a5799902771dd8601dd933afae6cb6b5307a5d0e.tar.gz
Merge pull request #25180 from keszybz/ukify
ukify: add helper to create UKIs
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build34
1 files changed, 33 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 08c9c842ab..1ddb42993a 100644
--- a/meson.build
+++ b/meson.build
@@ -716,6 +716,17 @@ if run_command(python, '-c', 'import jinja2', check : false).returncode() != 0
error('python3 jinja2 missing')
endif
+python_310 = run_command(python, '-c',
+ 'import sys; sys.exit(0 if sys.version_info >= (3,10) else 1)',
+ check : false).returncode() == 0
+if get_option('ukify') == 'auto'
+ want_ukify = python_310
+elif get_option('ukify') == 'true' and not python310
+ error('ukify requires Python >= 3.10')
+else
+ want_ukify = get_option('ukify') == 'true'
+endif
+
############################################################
gperf = find_program('gperf')
@@ -2191,6 +2202,7 @@ subdir('src/test')
subdir('src/fuzz')
subdir('rules.d')
subdir('test')
+subdir('src/ukify/test') # needs to be last for test_env variable
############################################################
@@ -2587,7 +2599,7 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1
boot_link_with = [libsystemd_static, libshared_static]
endif
- public_programs += executable(
+ exe = executable(
'bootctl',
'src/boot/bootctl.c',
include_directories : includes,
@@ -2596,6 +2608,14 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1
versiondep],
install_rpath : rootpkglibdir,
install : true)
+ public_programs += exe
+
+ if want_tests != 'false'
+ test('test-bootctl-json',
+ test_bootctl_json_sh,
+ args : exe.full_path(),
+ depends : exe)
+ endif
public_programs += executable(
'systemd-bless-boot',
@@ -4008,6 +4028,18 @@ if want_tests != 'false' and want_kernel_install
args : [exe.full_path(), loaderentry_install])
endif
+if want_ukify
+ exe = custom_target(
+ 'ukify',
+ input : 'src/ukify/ukify.py',
+ output : 'ukify',
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
+ install : true,
+ install_mode : 'rwxr-xr-x',
+ install_dir : rootlibexecdir)
+ public_programs += exe
+endif
+
############################################################
runtest_env = custom_target(