Thomas Heijligen submitted this change.

View Change



7 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved Anastasia Klimchuk: Looks good to me, approved
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>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66703
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M meson.build
M meson_options.txt
2 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/meson.build b/meson.build
index 634e627..6b00ec2 100644
--- a/meson.build
+++ b/meson.build
@@ -75,7 +75,7 @@
config_parade_lspcon = get_option('config_parade_lspcon')
config_mediatek_i2c_spi = get_option('config_mediatek_i2c_spi')
config_realtek_mst_i2c_spi = get_option('config_realtek_mst_i2c_spi')
-config_print_wiki= get_option('print_wiki')
+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')

@@ -409,9 +409,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 != ''
diff --git a/meson_options.txt b/meson_options.txt
index 850505d..4ec4aaa 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,7 +1,7 @@
option('pciutils', type : 'boolean', value : true, description : 'use pciutils')
option('usb', type : 'boolean', value : true, description : 'use libusb1')
option('classic_cli', type : 'feature', value : 'enabled', description : 'classic flashrom cli binary')
-option('print_wiki', type : 'boolean', value : true, description : 'Print Wiki')
+option('classic_cli_print_wiki', type : 'feature', value : 'disabled', description : 'Print Wiki')
option('default_programmer_name', type : 'string', description : 'default programmer')
option('default_programmer_args', type : 'string', description : 'default programmer arguments')
option('ich_descriptors_tool', type : 'feature', value : 'auto', description : 'Build ich_descriptors_tool')

To view, visit change 66703. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic6c959b8b64ec2756b4535bd1b3320860f836aa5
Gerrit-Change-Number: 66703
Gerrit-PatchSet: 9
Gerrit-Owner: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged