From: Arnaud Lacombe <lacombar@gmail.com>
To: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Michal Marek <mmarek@suse.cz>,
Arnaud Lacombe <lacombar@gmail.com>,
Steven Rostedt <srostedt@redhat.com>
Subject: [RFC 2/4] kconfig/streamline_config.pl: directly access LSMOD
Date: Fri, 1 Jul 2011 19:31:14 -0400 [thread overview]
Message-ID: <1309563076-5050-3-git-send-email-lacombar@gmail.com> (raw)
In-Reply-To: <1309563076-5050-1-git-send-email-lacombar@gmail.com>
Cc: Steven Rostedt <srostedt@redhat.com>
---
scripts/kconfig/Makefile | 12 ++----------
scripts/kconfig/streamline_config.pl | 8 ++++++--
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 84abb2f..a718b3c 100644
--- a/scripts/kconfig/Makefile
+++ b/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/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index a4fe923..ae34d20 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -115,7 +115,7 @@ 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 @@ my %modules;
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
--
1.7.3.4.574.g608b.dirty
next prev parent reply other threads:[~2011-07-01 23:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-01 23:31 [RFC 0/4] streamline_config clean-ups Arnaud Lacombe
2011-07-01 23:31 ` [RFC 1/4] kbuild: export MAKECMDGOALS Arnaud Lacombe
2011-07-18 19:05 ` Arnaud Lacombe
2011-07-19 14:07 ` Michal Marek
2011-07-19 16:28 ` Arnaud Lacombe
2011-07-25 13:14 ` Steven Rostedt
2011-07-01 23:31 ` Arnaud Lacombe [this message]
2011-07-01 23:31 ` [RFC 3/4] kconfig/streamline_config.pl: merge local{mod,yes}config Arnaud Lacombe
2011-07-01 23:31 ` [RFC 4/4] kconfig/streamline_config.pl: move config generation to script Arnaud Lacombe
2011-07-08 21:47 ` [RFC 0/4] streamline_config clean-ups Arnaud Lacombe
2011-07-09 0:19 ` Steven Rostedt
2011-07-14 0:54 ` Steven Rostedt
2011-07-14 2:41 ` Arnaud Lacombe
2011-07-14 13:09 ` 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=1309563076-5050-3-git-send-email-lacombar@gmail.com \
--to=lacombar@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=srostedt@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox