Nico Huber has uploaded this change for review.

View Change

Makefile: Enable bitbang_spi based on its dependency list

Change-Id: I2a22667cfe14e4c5816b3bce13de632941690d17
Signed-off-by: Nico Huber <nico.h@gmx.de>
---
M Makefile
1 file changed, 8 insertions(+), 17 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/80/55880/1
diff --git a/Makefile b/Makefile
index b8e1422..b00cef1 100644
--- a/Makefile
+++ b/Makefile
@@ -142,6 +142,12 @@
$(eval override $(p) := no)))
endef

+define filter_deps
+$(strip $(foreach p,$1, \
+ $(if $(filter $($(p)),yes), \
+ $(p))))
+endef
+
define disable_all
$(foreach p,$1, \
$(eval override $(p) := no))
@@ -481,27 +487,12 @@
endif

# Bitbanging SPI infrastructure, default off unless needed.
-ifeq ($(CONFIG_RAYER_SPI), yes)
-override CONFIG_BITBANG_SPI = yes
-else
-ifeq ($(CONFIG_PONY_SPI), yes)
-override CONFIG_BITBANG_SPI = yes
-else
-ifeq ($(CONFIG_INTERNAL), yes)
-override CONFIG_BITBANG_SPI = yes
-else
-ifeq ($(CONFIG_NICINTEL_SPI), yes)
-override CONFIG_BITBANG_SPI = yes
-else
-ifeq ($(CONFIG_OGP_SPI), yes)
+
+ifneq ($(call filter_deps,$(DEPENDS_ON_BITBANG_SPI)), )
override CONFIG_BITBANG_SPI = yes
else
CONFIG_BITBANG_SPI ?= no
endif
-endif
-endif
-endif
-endif

###############################################################################
# Handle CONFIG_* variables that depend on others set (and verified) above.

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I2a22667cfe14e4c5816b3bce13de632941690d17
Gerrit-Change-Number: 55880
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-MessageType: newchange