From c28a28eed1943c1efb958448a87a2e8f0baf48d6 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sat, 8 Feb 2014 17:26:04 +0100 Subject: [PATCH] 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" Cc: Peter Korsgaard Cc: Arnout Vandecappelle Signed-off-by: Thomas Petazzoni --- package/pkg-utils.mk | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.30.2