Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a926d43 authored by Yann E. MORIN's avatar Yann E. MORIN Committed by Michal Marek
Browse files

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: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent b341f788
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#  include <config.h>
#endif

#include <stdlib.h>
#include "lkc.h"
#include "images.c"

@@ -22,7 +23,6 @@
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <stdlib.h>

//#define DEBUG

+1 −1
Original line number Diff line number Diff line
@@ -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()
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
 */
#define _GNU_SOURCE
#include <string.h>
#include <stdlib.h>

#include "lkc.h"
#include "nconf.h"