]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: ukify depends on GNU_EFI
authorLudwig Nussel <ludwig.nussel@suse.de>
Wed, 18 Jan 2023 09:25:58 +0000 (10:25 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 19 Jan 2023 11:42:18 +0000 (11:42 +0000)
ukify is rather efi specific and the manpage is already conditional on
HAVE_GNU_EFI so make the program also depend on HAVE_GNU_EFI

meson.build

index 2688c3925252704b3109b971a3312a1dcbed8d24..d1f3a00691b212f210f6841fbee6ed14eedab7c1 100644 (file)
@@ -716,24 +716,6 @@ endif
 
 ############################################################
 
-python = find_program('python3')
-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')
 
 gperf_test_format = '''
@@ -1989,6 +1971,24 @@ jinja2_cmdline = [meson_render_jinja2, config_h, version_h]
 
 ############################################################
 
+python = find_program('python3')
+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  and conf.get('HAVE_GNU_EFI') == 1
+elif get_option('ukify') == 'true' and (not python310 or conf.get('HAVE_GNU_EFI') != 1)
+    error('ukify requires Python >= 3.10 and GNU EFI')
+else
+    want_ukify = get_option('ukify') == 'true'
+endif
+
+############################################################
+
 # binaries that have --help and are intended for use by humans,
 # usually, but not always, installed in /bin.
 public_programs = []