From: Yann E. MORIN Date: Sat, 8 Feb 2014 16:26:04 +0000 (+0100) Subject: packages infra: add function to get a Kconfig option X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c28a28eed1943c1efb958448a87a2e8f0baf48d6;p=buildroot.git 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 --- 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