From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Marek <mmarek@suse.cz>,
linux-kbuild@vger.kernel.org, Arnaud Lacombe <lacombar@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 1/5] [PATCH 1/5] kconfig: Make localmodconfig handle environment variables
Date: Fri, 29 Oct 2010 01:43:11 -0400 [thread overview]
Message-ID: <20101029054423.498608001@goodmis.org> (raw)
In-Reply-To: 20101029054310.790179545@goodmis.org
[-- Attachment #1: 0001-kconfig-Make-localmodconfig-handle-environment-varia.patch --]
[-- Type: text/plain, Size: 1408 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
The commit 838a2e55e6a4e9e8a10451ed2ef0f7a08dabdb04
kbuild: migrate all arch to the kconfig mainmenu upgrade
Broke make localmodconfig. The reason was that it added a
environment variable to the kconfig source, which the
streamline_config.pl could not handle.
This patch changes streamline_config.pl to handle kconfig sources
using environment variables in their names.
Cc: Arnaud Lacombe <lacombar@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
scripts/kconfig/streamline_config.pl | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index c70a27d..cc10bcf 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -137,7 +137,17 @@ sub read_kconfig {
my $config;
my @kconfigs;
- open(KIN, "$ksource/$kconfig") || die "Can't open $kconfig";
+ my $source = "$ksource/$kconfig";
+ my $last_source = "";
+
+ # Check for any environment variables used
+ while ($source =~ /\$(\w+)/ && $last_source ne $source) {
+ my $env = $1;
+ $last_source = $source;
+ $source =~ s/\$$env/$ENV{$env}/;
+ }
+
+ open(KIN, "$source") || die "Can't open $kconfig";
while (<KIN>) {
chomp;
--
1.7.1
next prev parent reply other threads:[~2010-10-29 5:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-29 5:43 [PATCH 0/5] [GIT PULL] kconfig: Fixes to make localmodconfig Steven Rostedt
2010-10-29 5:43 ` Steven Rostedt [this message]
2010-10-30 0:26 ` [PATCH 1/5] [PATCH 1/5] kconfig: Make localmodconfig handle environment variables Arnaud Lacombe
2010-10-30 1:27 ` Steven Rostedt
2010-10-31 22:05 ` Arnaud Lacombe
2010-11-09 0:49 ` Steven Rostedt
2010-11-25 15:45 ` Michal Marek
2010-11-25 16:21 ` Arnaud Lacombe
2010-11-25 16:37 ` Michal Marek
2010-10-29 5:43 ` [PATCH 2/5] [PATCH 2/5] kconfig: Fix variable name typo %prompts in streamline_config.pl Steven Rostedt
2010-10-29 5:43 ` [PATCH 3/5] [PATCH 3/5] kconfig: Fix missing declaration of variable $dir " Steven Rostedt
2010-10-29 5:43 ` [PATCH 4/5] [PATCH 4/5] kconfig: Fix streamline_config to read multi line deps in Kconfig files Steven Rostedt
2010-10-29 5:43 ` [PATCH 5/5] [PATCH 5/5] kconfig: Have streamline_config process menuconfigs too Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101029054423.498608001@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=lacombar@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=sam@ravnborg.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.