From 179e8d060ca9e84a500b59cb75755bec6c5040a6 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Tue, 2 Aug 2016 22:30:16 +0200 Subject: [PATCH] Synchronise with v4.3 Signed-off-by: "Yann E. MORIN" --- .version | 2 +- libs/parser/confdata.c | 7 ++----- libs/parser/hconf.gperf | 1 + libs/parser/lconf.l | 20 +++++++++++--------- libs/parser/symbol.c | 3 +-- scripts/ksync.log | 3 +++ utils/merge | 4 ++++ 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.version b/.version index 2bc9faa..068a992 100644 --- a/.version +++ b/.version @@ -1,2 +1,2 @@ -4.2.0 64291f7db5bd8150a74ad2036f1037e6a0428df2 Hurr durr I'ma sheep +4.3.0 6a13feb9c82803e2b815eca72fa7a9f5561d7861 Blurry Fish Butt 0 diff --git a/libs/parser/confdata.c b/libs/parser/confdata.c index c814f57..0b7dc2f 100644 --- a/libs/parser/confdata.c +++ b/libs/parser/confdata.c @@ -268,8 +268,7 @@ int conf_read_simple(const char *name, int def) goto load; sym_add_change_count(1); if (!sym_defconfig_list) { - if (modules_sym) - sym_calc_value(modules_sym); + sym_calc_value(modules_sym); return 1; } @@ -404,9 +403,7 @@ setsym: } free(line); fclose(in); - - if (modules_sym) - sym_calc_value(modules_sym); + sym_calc_value(modules_sym); return 0; } diff --git a/libs/parser/hconf.gperf b/libs/parser/hconf.gperf index b6ac02d..ac498f0 100644 --- a/libs/parser/hconf.gperf +++ b/libs/parser/hconf.gperf @@ -22,6 +22,7 @@ comment, T_COMMENT, TF_COMMAND config, T_CONFIG, TF_COMMAND menuconfig, T_MENUCONFIG, TF_COMMAND help, T_HELP, TF_COMMAND +---help---, T_HELP, TF_COMMAND if, T_IF, TF_COMMAND|TF_PARAM endif, T_ENDIF, TF_COMMAND depends, T_DEPENDS, TF_COMMAND diff --git a/libs/parser/lconf.l b/libs/parser/lconf.l index 200a3fe..c410d25 100644 --- a/libs/parser/lconf.l +++ b/libs/parser/lconf.l @@ -66,9 +66,16 @@ static void alloc_string(const char *str, int size) memcpy(text, str, size); text[size] = 0; } + +static void warn_ignored_character(char chr) +{ + fprintf(stderr, + "%s:%d:warning: ignoring unsupported character '%c'\n", + zconf_curname(), zconf_lineno(), chr); +} %} -n [A-Za-z0-9_] +n [A-Za-z0-9_-] %% int str = 0; @@ -106,7 +113,7 @@ n [A-Za-z0-9_] zconflval.string = text; return T_WORD; } - . + . warn_ignored_character(*yytext); \n { BEGIN(INITIAL); current_file->lineno++; @@ -132,8 +139,7 @@ n [A-Za-z0-9_] BEGIN(STRING); } \n BEGIN(INITIAL); current_file->lineno++; return T_EOL; - --- /* ignore */ - ({n}|[-/.])+ { + ({n}|[/.])+ { const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); if (id && id->flags & TF_PARAM) { zconflval.id = id; @@ -146,11 +152,7 @@ n [A-Za-z0-9_] #.* /* comment */ \\\n current_file->lineno++; [[:blank:]]+ - . { - fprintf(stderr, - "%s:%d:warning: ignoring unsupported character '%c'\n", - zconf_curname(), zconf_lineno(), *yytext); - } + . warn_ignored_character(*yytext); <> { BEGIN(INITIAL); } diff --git a/libs/parser/symbol.c b/libs/parser/symbol.c index 70c5ee1..50878dc 100644 --- a/libs/parser/symbol.c +++ b/libs/parser/symbol.c @@ -467,8 +467,7 @@ void sym_clear_all_valid(void) for_all_symbols(i, sym) sym->flags &= ~SYMBOL_VALID; sym_add_change_count(1); - if (modules_sym) - sym_calc_value(modules_sym); + sym_calc_value(modules_sym); } bool sym_tristate_within_range(struct symbol *sym, tristate val) diff --git a/scripts/ksync.log b/scripts/ksync.log index 6bcdb8b..5e0b1cf 100644 --- a/scripts/ksync.log +++ b/scripts/ksync.log @@ -112,3 +112,6 @@ bc8f8f5 merge_config.sh: rename MAKE to RUNMAKE e911503 Kconfig: Remove bad inference rules expr_eliminate_dups2() 2e0d737 kconfig: don't silently ignore unhandled characters 31847b6 kconfig: allow use of relations other than (in)equality +35ffd08 kconfig: Delete unnecessary checks before the function call "sym_calc_value" +c226456 kconfig: warn of unhandled characters in Kconfig commands +78a6854 merge_config.sh: exit on missing input files diff --git a/utils/merge b/utils/merge index ec8e203..0d883b3 100755 --- a/utils/merge +++ b/utils/merge @@ -100,6 +100,10 @@ cat $INITFILE > $TMP_FILE # Merge files, printing warnings on overridden values for MERGE_FILE in $MERGE_LIST ; do echo "Merging $MERGE_FILE" + if [ ! -r "$MERGE_FILE" ]; then + echo "The merge file '$MERGE_FILE' does not exist. Exit." >&2 + exit 1 + fi CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE) for CFG in $CFG_LIST ; do -- 2.39.5