Nico Huber submitted this change.
Makefile: use the HAS_ USE_ scheme for linux i2c dependent programmer
Change-Id: I47acdf89a369441b9fc664352c27c43b461545b1
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/62197
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
---
M Makefile
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 9a9628f..a2ba3b0 100644
--- a/Makefile
+++ b/Makefile
@@ -168,6 +168,10 @@
DEPENDS_ON_LIB_NI845X := \
CONFIG_NI845X_SPI \
+DEPENDS_ON_LINUX_I2C := \
+ CONFIG_MSTARDDC_SPI \
+ CONFIG_LSPCON_I2C_SPI \
+ CONFIG_REALTEK_MST_I2C_SPI \
ifeq ($(CONFIG_ENABLE_LIBUSB1_PROGRAMMERS), no)
$(call disable_all,$(DEPENDS_ON_LIBUSB1))
@@ -302,7 +306,7 @@
endif
ifeq ($(HAS_LINUX_I2C), no)
-$(call mark_unsupported,CONFIG_MSTARDDC_SPI CONFIG_LSPCON_I2C_SPI CONFIG_REALTEK_MST_I2C_SPI)
+$(call mark_unsupported,DEPENDS_ON_LINUX_I2C)
endif
ifeq ($(TARGET_OS), Android)
@@ -800,7 +804,8 @@
PROGRAMMER_OBJS += ni845x_spi.o
endif
-ifeq ($(HAS_LINUX_I2C), yes)
+USE_LINUX_I2C := $(if $(call filter_deps,$(DEPENDS_ON_LINUX_I2C)),yes,no)
+ifeq ($(USE_LINUX_I2C), yes)
LIB_OBJS += i2c_helper_linux.o
endif
To view, visit change 62197. To unsubscribe, or for help writing mail filters, visit settings.