From: Yann E. MORIN Date: Fri, 19 Oct 2012 23:06:25 +0000 (+0200) Subject: kconfig: get CONFIG_ prefix from the environment X-Git-Tag: 1.9.8~3 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=093668ba6752b4667c5109f37031a68c56d27cde;p=carl9170fw.git kconfig: get CONFIG_ prefix from the environment Currently, the CONFIG_ prefix is hard-coded in the kconfig frontends executables. This means that two projects that use kconfig with different prefixes can not share the same kconfig frontends. Instead of hard-coding the prefix in the frontends, get it from the environment, and revert back to hard-coded value if not found. Signed-off-by: "Yann E. MORIN" Signed-off-by: Michal Marek Signed-off-by: Christian Lamparter --- diff --git a/config/lkc.h b/config/lkc.h index 7aa9db0..7577a7f 100644 --- a/config/lkc.h +++ b/config/lkc.h @@ -41,7 +41,7 @@ extern "C" { #endif static inline const char *CONFIG_prefix(void) { - return CONFIG_; + return getenv( "CONFIG_" ) ?: CONFIG_; } #undef CONFIG_ #define CONFIG_ CONFIG_prefix()