summaryrefslogtreecommitdiffstats
path: root/include/package-ipkg.mk
diff options
context:
space:
mode:
authorEneas U de Queiroz <cote2004-github@yahoo.com>2019-04-24 22:29:43 +0000
committerChristian Lamparter <chunkeey@gmail.com>2019-05-31 11:21:22 +0200
commita41f474d17fef8aa94fdd6a8aa9b9a4bd2e5fa0f (patch)
treeab184ba6645884c94829d495eb2df20af03338fa /include/package-ipkg.mk
parentf22ef1f1de8816201c6d8551e1bb3f3fc58c4328 (diff)
downloadopenwrt-a41f474d17fef8aa94fdd6a8aa9b9a4bd2e5fa0f.tar.gz
openwrt-a41f474d17fef8aa94fdd6a8aa9b9a4bd2e5fa0f.tar.bz2
openwrt-a41f474d17fef8aa94fdd6a8aa9b9a4bd2e5fa0f.zip
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]
Diffstat (limited to 'include/package-ipkg.mk')
-rw-r--r--include/package-ipkg.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index 9ca4879bfa..38252b95cd 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -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)))