kconfig: Add wildcard support for "source"
Kconfig's include directive "source" does not support wildcards (e.g. source src/mainboard/*/Kconfig) which makes automatic inclusion of all boards a tedious task and prevents us from implementing "drop in" boards. In our Makefile.inc files we already include mainboard directories per wildcard, so let's add the infrastructure to do the same with Kconfig. Change-Id: I1988ff6ce3e167e86bb5cb65fc04a13748599dad Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/9294 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <wordexp.h>
|
||||
|
||||
#include "lkc.h"
|
||||
|
||||
@@ -336,6 +337,21 @@ void zconf_nextfile(const char *name)
|
||||
current_file = file;
|
||||
}
|
||||
|
||||
void zconf_nextfiles(const char *wildcard)
|
||||
{
|
||||
wordexp_t p;
|
||||
char **w;
|
||||
int i;
|
||||
|
||||
wordexp(wildcard, &p, 0);
|
||||
w = p.we_wordv;
|
||||
|
||||
for (i = p.we_wordc - 1; i >= 0; i--)
|
||||
zconf_nextfile(w[i]);
|
||||
|
||||
wordfree(&p);
|
||||
}
|
||||
|
||||
static void zconf_endfile(void)
|
||||
{
|
||||
struct buffer *parent;
|
||||
|
Reference in New Issue
Block a user