]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
meson: use arrays to manage module compressions/signatures
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 1 Jun 2026 14:45:40 +0000 (15:45 +0100)
committerLucas De Marchi <demarchi@kernel.org>
Sat, 20 Jun 2026 16:13:26 +0000 (11:13 -0500)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/426
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
meson.build

index d702a98cee0bee718e848a4e3ccaaaf3d4f297d4..9fdf763467b92888435c13e6634c03a5add3384b 100644 (file)
@@ -148,8 +148,8 @@ endif
 # Options
 ################################################################################
 
-module_compressions = ''
-module_signatures = ''
+compressions = []
+signatures = []
 
 features = []
 dep_map = {}
@@ -295,16 +295,23 @@ foreach tuple : _moar_deps
   cdata.set10('ENABLE_' + opt.to_upper(), have)
   cdata.set10('ENABLE_' + opt.to_upper() + '_DLOPEN', have and dlopen)
 
-  if opt == 'openssl'
-    module_signatures = have ? 'PKCS7 legacy' : 'legacy'
-  elif have
-    module_compressions += f'@opt@ '
+  if have
+    if opt == 'openssl'
+      signatures += ['PKCS7']
+    else
+      compressions += [f'@opt@']
+    endif
   endif
 
   features += ['@0@@1@'.format(have ? '+' : '-', opt.to_upper())]
   dep_map += {opt : dep}
 endforeach
 
+signatures += ['legacy']
+
+module_compressions = ' '.join(compressions)
+module_signatures = ' '.join(signatures)
+
 #-------------------------------------------------------------------------------
 # Config output
 #-------------------------------------------------------------------------------