build: add support to && in DEPENDS
Adds support to && operand in DEPENDS. Also, fixes generation of || dependencies by scripts/package-metadata.pl. The precedence order from higher to lower is && then ||. Use of parentheses to change the order is not supported. As before, they are silently ignored. Use them for readability only. Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [DMARC removal]
This commit is contained in:
committed by
Christian Lamparter
parent
f22ef1f1de
commit
a41f474d17
@@ -35,7 +35,8 @@ PARENR :=)
|
||||
|
||||
dep_split=$(subst :,$(space),$(1))
|
||||
dep_rem=$(subst !,,$(subst $(strip $(PARENL)),,$(subst $(strip $(PARENR)),,$(word 1,$(call dep_split,$(1))))))
|
||||
dep_confvar=$(strip $(foreach cond,$(subst ||, ,$(call dep_rem,$(1))),$(CONFIG_$(cond))))
|
||||
dep_and=dep_and_res:=$$(and $(subst $(space),$(comma),$(foreach cond,$(subst &&, ,$(1)),$$(CONFIG_$(cond)))))
|
||||
dep_confvar=$(strip $(foreach cond,$(subst ||, ,$(call dep_rem,$(1))),$(eval $(call dep_and,$(cond)))$(dep_and_res)))
|
||||
dep_pos=$(if $(call dep_confvar,$(1)),$(call dep_val,$(1)))
|
||||
dep_neg=$(if $(call dep_confvar,$(1)),,$(call dep_val,$(1)))
|
||||
dep_if=$(if $(findstring !,$(1)),$(call dep_neg,$(1)),$(call dep_pos,$(1)))
|
||||
|
||||
Reference in New Issue
Block a user