summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-10-15 19:53:28 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-10-22 08:27:23 +0200
commitf236cef3a33f959bcfa33be27b5e1af008042165 (patch)
tree9d23493b8c746eb3ea31c152ed041183011ca9ff /rules
parent9fddc0e2c858ce6705b3a5eb3715425e15a762ec (diff)
downloadptxdist-f236cef3a33f959bcfa33be27b5e1af008042165.tar.gz
ptxdist-f236cef3a33f959bcfa33be27b5e1af008042165.tar.xz
rules/pre: add new macro ptx/get-kconfig
It's basically the same as ptxd_get_kconfig but it avoids using bash, if possible, so it can be a bit faster. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules')
-rw-r--r--rules/pre/get_alternative.make11
1 files changed, 11 insertions, 0 deletions
diff --git a/rules/pre/get_alternative.make b/rules/pre/get_alternative.make
index 81b05b585..1cf0c2541 100644
--- a/rules/pre/get_alternative.make
+++ b/rules/pre/get_alternative.make
@@ -44,4 +44,15 @@ $(call ptx/in-path,PTXDIST_PATH_PLATFORMCONFIGDIR,$(1)),
$(PTXDIST_PLATFORMCONFIGDIR)/$(strip $(1)))
endef
+define ptx/get-kconfig2
+$(call ptx/force-sh,
+unset $(2) &&
+. "$(1)" &&
+test -n "$${$(2)}" &&
+echo "$${$(2)}"
+)
+endef
+define ptx/get-kconfig
+$(call ptx/get-kconfig2,$(strip $(1)),$(strip $(2)))
+endef
# vim: syntax=make