aboutsummaryrefslogtreecommitdiff
path: root/package/pkg-utils.mk
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2014-02-08 17:26:04 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-03-03 22:21:56 +0100
commitc28a28eed1943c1efb958448a87a2e8f0baf48d6 (patch)
tree45b971bfe38efc4940fc5ef7a67e738208257ddc /package/pkg-utils.mk
parentff673f9a22b1467878f1a117f2c6198e9683d5c7 (diff)
downloadbuildroot-c28a28eed1943c1efb958448a87a2e8f0baf48d6.tar.gz
buildroot-c28a28eed1943c1efb958448a87a2e8f0baf48d6.tar.bz2
packages infra: add function to get a Kconfig option
We so far have no mean to get the value from a Kconfig option from the .config file of a package (eg. linux, busybox...). Add a new function that returns the unmangled value of an option. It expect two arguments: - the Kconfig option name (complete, with leading CONFIG if necessary) - the .config file to get it from Note that, if the Kconfig option is a string, the returned value will contain the leading and trailing double-quotes. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Peter Korsgaard <jacmet@uclibc.org> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/pkg-utils.mk')
-rw-r--r--package/pkg-utils.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 91a198160f..99fefe6a44 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -52,6 +52,8 @@ define KCONFIG_DISABLE_OPT
echo "# $(1) is not set" >> $(2)
endef
+KCONFIG_GET_OPT = $(shell sed -e 's/^$(1)=//p' $(2))
+
# Helper functions to determine the name of a package and its
# directory from its makefile directory, using the $(MAKEFILE_LIST)
# variable provided by make. This is used by the *TARGETS macros to