From e4137c6913c7a84e5a4a8e0b4fd571d5d0b78616 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Sat, 13 Aug 2022 12:21:44 +0200 Subject: meson: Build the ich_descriptors_tool as feature Provide the meson option `-Dich_descriptors_tool=auto/enable/disabled` to determin if the ich_descriptors_tool should be build or not. On `auto` or `enabled` it will be, on `disabled` it will not be build. This is usefull for environments where the ich_descriptors_tool is not needed. Change-Id: Ief65a914019f72536d563eda36bd7f2f5330bea8 Signed-off-by: Thomas Heijligen Reviewed-on: https://review.coreboot.org/c/flashrom/+/66704 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- meson.build | 4 +++- meson_options.txt | 1 + util/meson.build | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 util/meson.build diff --git a/meson.build b/meson.build index 8eb65a8ae..065578e48 100644 --- a/meson.build +++ b/meson.build @@ -489,7 +489,9 @@ executable( link_with : libflashrom.get_static_lib(), # flashrom needs internal symbols of libflashrom ) -subdir('util') +if get_option('ich_descriptors_tool').auto() or get_option('ich_descriptors_tool').enabled() + subdir('util/ich_descriptors_tool') +endif # Use `.auto() or .enabled()` instead of `.allowed()` to keep the minimum meson version as low as possible. # `.allowed()` gets introduced in 0.59.0 diff --git a/meson_options.txt b/meson_options.txt index 3d37914ba..284bfba9a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -3,6 +3,7 @@ option('usb', type : 'boolean', value : true, description : 'use libusb1') option('print_wiki', type : 'boolean', value : true, 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') option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers') option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller') diff --git a/util/meson.build b/util/meson.build deleted file mode 100644 index 24278d73f..000000000 --- a/util/meson.build +++ /dev/null @@ -1 +0,0 @@ -subdir('ich_descriptors_tool') -- cgit v1.2.3