meson: Improve maintainability of build options

Exploit the array type for meson options to reduce the build system and
recipe noise with respect to the trigger selection. Discussion on how
this could be achieved occurred on the associated recipe patch:

https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/42911

Suggested-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Iaf38224047e24d10898063ee358e6f6164592001
diff --git a/meson.build b/meson.build
index e60bd8b..b6b8708 100644
--- a/meson.build
+++ b/meson.build
@@ -13,17 +13,16 @@
 udev = dependency('udev')
 udevdir = udev.get_pkgconfig_variable('udevdir')
 udevrules = [
-	'p10bmc-debug-trigger-kcs1',
-	'p10bmc-debug-trigger-kcs2',
-	'p10bmc-debug-trigger-kcs3',
-	'p10bmc-debug-trigger-kcs4',
+	'debug-trigger-kcs1',
+	'debug-trigger-kcs2',
+	'debug-trigger-kcs3',
+	'debug-trigger-kcs4',
 ]
 
-foreach rule : udevrules
-	if get_option(rule)
-		src = 'udev/rules.d/' + rule + '.rules'
-		dst = rule + '.rules'
-		rulesdir = udevdir + '/rules.d'
-		configure_file(input: src, output: dst, copy: true, install_dir: rulesdir)
-	endif
+triggers = get_option('triggers')
+foreach trigger : triggers
+	src = 'udev/rules.d/debug-trigger-' + trigger + '.rules'
+	dst = 'debug-trigger-' + trigger + '.rules'
+	rulesdir = udevdir + '/rules.d'
+	configure_file(input: src, output: dst, copy: true, install_dir: rulesdir)
 endforeach