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" <yann.morin.1998@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:

committed by
Michal Marek

parent
b341f7882f
commit
9a926d4354
@@ -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()
|
||||
|
Reference in New Issue
Block a user