summaryrefslogtreecommitdiff
path: root/util/kconfig/zconf.lex.c_shipped
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-04-03 20:01:38 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-04-06 23:52:57 +0200
commitf78a09b60c4ce24e2455615722dd6ed8e2ba85e2 (patch)
tree6ba23110d3abe24443934686abe609caad6ffc1f /util/kconfig/zconf.lex.c_shipped
parent1f5349e61d8aea950d6a197d11b0aa730aa80ee6 (diff)
downloadcoreboot-f78a09b60c4ce24e2455615722dd6ed8e2ba85e2.tar.xz
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>
Diffstat (limited to 'util/kconfig/zconf.lex.c_shipped')
-rw-r--r--util/kconfig/zconf.lex.c_shipped71
1 files changed, 44 insertions, 27 deletions
diff --git a/util/kconfig/zconf.lex.c_shipped b/util/kconfig/zconf.lex.c_shipped
index 349a7f2431..d2484de957 100644
--- a/util/kconfig/zconf.lex.c_shipped
+++ b/util/kconfig/zconf.lex.c_shipped
@@ -1,5 +1,5 @@
-#line 3 "scripts/kconfig/zconf.lex.c_shipped"
+#line 3 "zconf.lex.c"
#define YY_INT_ALIGNED short int
@@ -27,7 +27,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 37
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -72,7 +72,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -103,6 +102,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -171,7 +172,12 @@ typedef unsigned int flex_uint32_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-extern int zconfleng;
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t zconfleng;
extern FILE *zconfin, *zconfout;
@@ -197,11 +203,6 @@ extern FILE *zconfin, *zconfout;
#define unput(c) yyunput( c, (yytext_ptr) )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -219,7 +220,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -289,8 +290,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* yy_hold_char holds the character lost when zconftext is formed. */
static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int zconfleng;
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+yy_size_t zconfleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
@@ -318,7 +319,7 @@ static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file );
YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len );
+YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,yy_size_t len );
void *zconfalloc (yy_size_t );
void *zconfrealloc (void *,yy_size_t );
@@ -350,7 +351,7 @@ void zconffree (void * );
/* Begin user sect3 */
-#define zconfwrap(n) 1
+#define zconfwrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
@@ -775,6 +776,7 @@ char *zconftext;
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <wordexp.h>
#include "lkc.h"
@@ -870,7 +872,7 @@ FILE *zconfget_out (void );
void zconfset_out (FILE * out_str );
-int zconfget_leng (void );
+yy_size_t zconfget_leng (void );
char *zconfget_text (void );
@@ -1515,21 +1517,21 @@ static int yy_get_next_buffer (void)
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1560,7 +1562,7 @@ static int yy_get_next_buffer (void)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), (size_t) num_to_read );
+ (yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -1630,7 +1632,7 @@ static int yy_get_next_buffer (void)
yy_current_state = yy_nxt[yy_current_state][1];
yy_is_jam = (yy_current_state <= 0);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
static void yyunput (int c, register char * yy_bp )
@@ -1645,7 +1647,7 @@ static int yy_get_next_buffer (void)
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = (yy_n_chars) + 2;
+ register yy_size_t number_to_move = (yy_n_chars) + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
@@ -1694,7 +1696,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
+ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -1966,7 +1968,7 @@ void zconfpop_buffer_state (void)
*/
static void zconfensure_buffer_stack (void)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
@@ -2058,12 +2060,12 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
@@ -2150,7 +2152,7 @@ FILE *zconfget_out (void)
/** Get the length of the current token.
*
*/
-int zconfget_leng (void)
+yy_size_t zconfget_leng (void)
{
return zconfleng;
}
@@ -2392,6 +2394,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;