meson: Add print_wiki option
Align meson options to be equivalent to the Makefile as they are used in
Gentoo's ebuilds.
Signed-off-by: Daniel Campello <campello@chromium.org>
Change-Id: I97d2fd687aa21533b86f9af446038bfe3da1f7d3
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/51552
Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/71764
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/meson.build b/meson.build
index 6a9981f..1c7ffaa 100644
--- a/meson.build
+++ b/meson.build
@@ -66,6 +66,7 @@
config_stlinkv3_spi = get_option('config_stlinkv3_spi')
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 = []
@@ -417,6 +418,11 @@
cargs += '-DCONFIG_DEFAULT_PROGRAMMER_ARGS="' + config_default_programmer_args + '"'
+if config_print_wiki
+ srcs += 'print_wiki.c'
+ cargs += '-DCONFIG_PRINT_WIKI=1'
+endif
+
# we can't just link_with libflashrom as we require all the internal symbols...
executable(
'flashrom',
diff --git a/meson_options.txt b/meson_options.txt
index 54efa75..d606565 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,6 +2,7 @@
option('usb', type : 'boolean', value : true, description : 'use libusb1')
option('default_programmer_name', type : 'string', description : 'default programmer')
option('default_programmer_args', type : 'string', description : 'default programmer arguments')
+option('print_wiki', type : 'boolean', value : true, description : 'Print Wiki')
option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers')
option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller')