meson: Overhaul the print_wiki option
- Rename `print_wiki` to `classic_cli_print_wiki`
- Make it a meson feature type
- `classic_cli` must be enabled to enable `classic_cli_print_wiki`
- `classic_cli_print_wiki` is disabled by default
Change-Id: Ic6c959b8b64ec2756b4535bd1b3320860f836aa5
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/66703
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72356
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/meson.build b/meson.build
index 045b779..41335e5 100644
--- a/meson.build
+++ b/meson.build
@@ -72,9 +72,9 @@
config_serprog = get_option('config_serprog')
config_usbblaster_spi = get_option('config_usbblaster_spi')
config_stlinkv3_spi = get_option('config_stlinkv3_spi')
+config_print_wiki = get_option('classic_cli_print_wiki')
config_default_programmer_name = get_option('default_programmer_name')
config_default_programmer_args = get_option('default_programmer_args')
-config_print_wiki= get_option('print_wiki')
cargs = []
deps = []
@@ -389,9 +389,15 @@
endif
endif
-if config_print_wiki
- srcs += files('print_wiki.c')
- cargs += '-DCONFIG_PRINT_WIKI=1'
+
+
+if config_print_wiki.enabled()
+ if get_option('classic_cli').disabled()
+ error('`classic_cli_print_wiki` can not be enabled without `classic_cli`')
+ else
+ srcs += files('print_wiki.c')
+ cargs += '-DCONFIG_PRINT_WIKI=1'
+ endif
endif
if config_default_programmer_name != ''