since i'm not sure i'll be able to post anything for the rest of
the day once i leave my location, here's the patch:




diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 8986a48..0426636 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -257,7 +257,7 @@ $(obj)/lkc_defs.h: $(src)/lkc_proto.h
 # The following requires flex/bison/gperf
 # By default we use the _shipped versions, uncomment the following line if
 # you are modifying the flex/bison src.
-# LKC_GENPARSER := 1
+LKC_GENPARSER := 1

 ifdef LKC_GENPARSER

diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 6084525..3dd7957 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -60,7 +60,11 @@ struct symbol_value {
 };

 enum symbol_type {
-       S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER
+       S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_MATURITY, 
S_OTHER
+};
+
+enum maturity_level {
+       M_NONE, M_DEPRECATED, M_OBSOLETE
 };

 enum {
@@ -72,6 +76,7 @@ struct symbol {
        struct symbol *next;
        char *name;
        char *help;
+       enum maturity_level maturity;
        enum symbol_type type;
        struct symbol_value curr;
        struct symbol_value def[4];
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index d2c2a42..ea89bb0 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -359,6 +359,22 @@ static void get_symbol_str(struct gstr *r, struct symbol 
*sym)

        str_printf(r, "Symbol: %s [=%s]\n", sym->name,
                                       sym_get_string_value(sym));
+
+       if (sym->maturity != M_NONE) {
+               str_append(r, "Maturity: ");
+
+               switch (sym->maturity) {
+                       case M_DEPRECATED:
+                               str_append(r, "DEPRECATED\n");
+                               break;
+                       case M_OBSOLETE:
+                               str_append(r, "OBSOLETE\n");
+                               break;
+                       default:
+                               break;
+               }
+       }
+
        for_all_prompts(sym, prop)
                get_prompt_str(r, prop);
        hit = false;
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index c35dcc5..e48527e 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -100,6 +100,8 @@ const char *sym_type_name(enum symbol_type type)
                return "hex";
        case S_STRING:
                return "string";
+       case S_MATURITY:
+               return "maturity";
        case S_UNKNOWN:
                return "unknown";
        case S_OTHER:
@@ -679,6 +681,7 @@ struct symbol *sym_lookup(const char *name, int isconst)
        memset(symbol, 0, sizeof(*symbol));
        symbol->name = new_name;
        symbol->type = S_UNKNOWN;
+       symbol->maturity = M_NONE;
        if (isconst)
                symbol->flags |= SYMBOL_CONST;

diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf
index 9b44c80..756d559 100644
--- a/scripts/kconfig/zconf.gperf
+++ b/scripts/kconfig/zconf.gperf
@@ -25,6 +25,7 @@ endif,                T_ENDIF,        TF_COMMAND
 depends,       T_DEPENDS,      TF_COMMAND
 requires,      T_REQUIRES,     TF_COMMAND
 optional,      T_OPTIONAL,     TF_COMMAND
+maturity,      T_MATURITY,     TF_COMMAND
 default,       T_DEFAULT,      TF_COMMAND, S_UNKNOWN
 prompt,                T_PROMPT,       TF_COMMAND
 tristate,      T_TYPE,         TF_COMMAND, S_TRISTATE
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 92eb02b..9277938 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -66,6 +66,7 @@ static struct menu *current_menu, *current_entry;
 %token <id>T_DEPENDS
 %token <id>T_REQUIRES
 %token <id>T_OPTIONAL
+%token <id>T_MATURITY
 %token <id>T_PROMPT
 %token <id>T_TYPE
 %token <id>T_DEFAULT
@@ -120,7 +121,7 @@ stmt_list:
 ;

 option_name:
-       T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | 
T_DEFAULT
+       T_DEPENDS | T_MATURITY | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | 
T_RANGE | T_DEFAULT
 ;

 common_stmt:
@@ -177,6 +178,7 @@ config_option_list:
        | config_option_list config_option
        | config_option_list symbol_option
        | config_option_list depends
+       | config_option_list maturity
        | config_option_list help
        | config_option_list option_error
        | config_option_list T_EOL
@@ -269,6 +271,7 @@ choice_option_list:
          /* empty */
        | choice_option_list choice_option
        | choice_option_list depends
+       | choice_option_list maturity
        | choice_option_list help
        | choice_option_list T_EOL
        | choice_option_list option_error
@@ -349,7 +352,7 @@ menu: T_MENU prompt T_EOL
        printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
 };

-menu_entry: menu depends_list
+menu_entry: menu maturity_set_opt depends_list
 {
        $$ = menu_add_menu();
 };
@@ -430,6 +433,18 @@ depends: T_DEPENDS T_ON expr T_EOL
        printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), 
zconf_lineno());
 };

+/* maturity setting */
+
+maturity_set_opt:
+         /* empty */
+       | maturity
+;
+
+maturity: T_MATURITY symbol T_EOL
+{
+       printd(DEBUG_PARSE, "%s:%d:maturity\n", zconf_curname(), 
zconf_lineno());
+};
+
 /* prompt statement */

 prompt_stmt_opt:
@@ -519,6 +534,7 @@ const char *zconf_tokenname(int token)
        case T_IF:              return "if";
        case T_ENDIF:           return "endif";
        case T_DEPENDS:         return "depends";
+       case T_MATURITY:        return "maturity";
        }
        return "<token>";
 }
@@ -615,6 +631,9 @@ void print_symbol(FILE *out, struct menu *menu)
        case S_HEX:
                fputs("  hex\n", out);
                break;
+       case S_MATURITY:
+               fputs("  maturity\n", out);
+               break;
        default:
                fputs("  ???\n", out);
                break;

-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to