From d78f428d80933e28c3c65e079b8e1e82bebc93b7 Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Fri, 1 Jul 2011 17:45:31 -0400 Subject: [PATCH] --- yaml --- r: 274297 b: refs/heads/master c: f597a718296eef9622ebc1d13f4f8324fa169cef h: refs/heads/master i: 274295: b32a5301664fbc1984b987adff196e8385a0d828 v: v3 --- [refs] | 2 +- trunk/scripts/kconfig/Makefile | 12 ++---------- trunk/scripts/kconfig/menu.c | 13 ++++++++----- trunk/scripts/kconfig/nconf.c | 2 ++ trunk/scripts/kconfig/streamline_config.pl | 8 ++++++-- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index 399dc3fa739b..7bbd1411e476 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 57e6292da67c30acf92f08604f918192a886838a +refs/heads/master: f597a718296eef9622ebc1d13f4f8324fa169cef diff --git a/trunk/scripts/kconfig/Makefile b/trunk/scripts/kconfig/Makefile index 82d2eb285b70..bd41ab29e680 100644 --- a/trunk/scripts/kconfig/Makefile +++ b/trunk/scripts/kconfig/Makefile @@ -33,17 +33,9 @@ silentoldconfig: $(obj)/conf $(Q)mkdir -p include/generated $< --$@ $(Kconfig) -# if no path is given, then use src directory to find file -ifdef LSMOD -LSMOD_F := $(LSMOD) -ifeq ($(findstring /,$(LSMOD)),) - LSMOD_F := $(objtree)/$(LSMOD) -endif -endif - localmodconfig: $(obj)/streamline_config.pl $(obj)/conf $(Q)mkdir -p include/generated - $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config + $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config $(Q)if [ -f .config ]; then \ cmp -s .tmp.config .config || \ (mv -f .config .config.old.1; \ @@ -58,7 +50,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf localyesconfig: $(obj)/streamline_config.pl $(obj)/conf $(Q)mkdir -p include/generated - $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config + $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config $(Q)sed -i s/=m/=y/ .tmp.config $(Q)if [ -f .config ]; then \ cmp -s .tmp.config .config || \ diff --git a/trunk/scripts/kconfig/menu.c b/trunk/scripts/kconfig/menu.c index 8c2a97e60faf..d66008639a43 100644 --- a/trunk/scripts/kconfig/menu.c +++ b/trunk/scripts/kconfig/menu.c @@ -10,7 +10,8 @@ #include "lkc.h" -static const char nohelp_text[] = "There is no help available for this option."; +static const char nohelp_text[] = N_( + "There is no help available for this option.\n"); struct menu rootmenu; static struct menu **last_entry_ptr; @@ -594,14 +595,16 @@ struct gstr get_relations_str(struct symbol **sym_arr) void menu_get_ext_help(struct menu *menu, struct gstr *help) { struct symbol *sym = menu->sym; - const char *help_text = nohelp_text; if (menu_has_help(menu)) { - if (sym->name) + if (sym->name) { str_printf(help, "%s%s:\n\n", CONFIG_, sym->name); - help_text = menu_get_help(menu); + str_append(help, _(menu_get_help(menu))); + str_append(help, "\n"); + } + } else { + str_append(help, nohelp_text); } - str_printf(help, "%s\n", _(help_text)); if (sym) get_symbol_str(help, sym); } diff --git a/trunk/scripts/kconfig/nconf.c b/trunk/scripts/kconfig/nconf.c index b113c50209e3..39ca1f1640ea 100644 --- a/trunk/scripts/kconfig/nconf.c +++ b/trunk/scripts/kconfig/nconf.c @@ -182,6 +182,8 @@ setmod_text[] = N_( "This feature depends on another which\n" "has been configured as a module.\n" "As a result, this feature will be built as a module."), +nohelp_text[] = N_( +"There is no help available for this option.\n"), load_config_text[] = N_( "Enter the name of the configuration file you wish to load.\n" "Accept the name shown to restore the configuration you\n" diff --git a/trunk/scripts/kconfig/streamline_config.pl b/trunk/scripts/kconfig/streamline_config.pl index a4fe923c0131..ae34d2007f57 100644 --- a/trunk/scripts/kconfig/streamline_config.pl +++ b/trunk/scripts/kconfig/streamline_config.pl @@ -115,7 +115,7 @@ sub find_config { # Get the build source and top level Kconfig file (passed in) my $ksource = $ARGV[0]; my $kconfig = $ARGV[1]; -my $lsmod_file = $ARGV[2]; +my $lsmod_file = $ENV{'LSMOD'}; my @makefiles = `find $ksource -name Makefile 2>/dev/null`; chomp @makefiles; @@ -296,7 +296,11 @@ sub read_kconfig { if (defined($lsmod_file)) { if ( ! -f $lsmod_file) { - die "$lsmod_file not found"; + if ( -f $ENV{'objtree'}."/".$lsmod_file) { + $lsmod_file = $ENV{'objtree'}."/".$lsmod_file; + } else { + die "$lsmod_file not found"; + } } if ( -x $lsmod_file) { # the file is executable, run it