diff options
author | Arnaud Lacombe <lacombar@gmail.com> | 2011-07-01 17:45:31 -0400 |
---|---|---|
committer | Arnaud Lacombe <lacombar@gmail.com> | 2011-08-08 01:44:25 -0400 |
commit | f597a718296eef9622ebc1d13f4f8324fa169cef (patch) | |
tree | 56dc878a5fb3661f7d2db7e1965bdb27f8af497e /scripts | |
parent | 322a8b034003c0d46d39af85bf24fee27b902f48 (diff) |
kconfig/streamline_config.pl: directly access LSMOD from the environment
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/Makefile | 12 | ||||
-rw-r--r-- | scripts/kconfig/streamline_config.pl | 8 |
2 files changed, 8 insertions, 12 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 82d2eb285b70..bd41ab29e680 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -33,17 +33,9 @@ silentoldconfig: $(obj)/conf | |||
33 | $(Q)mkdir -p include/generated | 33 | $(Q)mkdir -p include/generated |
34 | $< --$@ $(Kconfig) | 34 | $< --$@ $(Kconfig) |
35 | 35 | ||
36 | # if no path is given, then use src directory to find file | ||
37 | ifdef LSMOD | ||
38 | LSMOD_F := $(LSMOD) | ||
39 | ifeq ($(findstring /,$(LSMOD)),) | ||
40 | LSMOD_F := $(objtree)/$(LSMOD) | ||
41 | endif | ||
42 | endif | ||
43 | |||
44 | localmodconfig: $(obj)/streamline_config.pl $(obj)/conf | 36 | localmodconfig: $(obj)/streamline_config.pl $(obj)/conf |
45 | $(Q)mkdir -p include/generated | 37 | $(Q)mkdir -p include/generated |
46 | $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config | 38 | $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config |
47 | $(Q)if [ -f .config ]; then \ | 39 | $(Q)if [ -f .config ]; then \ |
48 | cmp -s .tmp.config .config || \ | 40 | cmp -s .tmp.config .config || \ |
49 | (mv -f .config .config.old.1; \ | 41 | (mv -f .config .config.old.1; \ |
@@ -58,7 +50,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf | |||
58 | 50 | ||
59 | localyesconfig: $(obj)/streamline_config.pl $(obj)/conf | 51 | localyesconfig: $(obj)/streamline_config.pl $(obj)/conf |
60 | $(Q)mkdir -p include/generated | 52 | $(Q)mkdir -p include/generated |
61 | $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config | 53 | $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config |
62 | $(Q)sed -i s/=m/=y/ .tmp.config | 54 | $(Q)sed -i s/=m/=y/ .tmp.config |
63 | $(Q)if [ -f .config ]; then \ | 55 | $(Q)if [ -f .config ]; then \ |
64 | cmp -s .tmp.config .config || \ | 56 | cmp -s .tmp.config .config || \ |
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index a4fe923c0131..ae34d2007f57 100644 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl | |||
@@ -115,7 +115,7 @@ find_config; | |||
115 | # Get the build source and top level Kconfig file (passed in) | 115 | # Get the build source and top level Kconfig file (passed in) |
116 | my $ksource = $ARGV[0]; | 116 | my $ksource = $ARGV[0]; |
117 | my $kconfig = $ARGV[1]; | 117 | my $kconfig = $ARGV[1]; |
118 | my $lsmod_file = $ARGV[2]; | 118 | my $lsmod_file = $ENV{'LSMOD'}; |
119 | 119 | ||
120 | my @makefiles = `find $ksource -name Makefile 2>/dev/null`; | 120 | my @makefiles = `find $ksource -name Makefile 2>/dev/null`; |
121 | chomp @makefiles; | 121 | chomp @makefiles; |
@@ -296,7 +296,11 @@ my %modules; | |||
296 | 296 | ||
297 | if (defined($lsmod_file)) { | 297 | if (defined($lsmod_file)) { |
298 | if ( ! -f $lsmod_file) { | 298 | if ( ! -f $lsmod_file) { |
299 | die "$lsmod_file not found"; | 299 | if ( -f $ENV{'objtree'}."/".$lsmod_file) { |
300 | $lsmod_file = $ENV{'objtree'}."/".$lsmod_file; | ||
301 | } else { | ||
302 | die "$lsmod_file not found"; | ||
303 | } | ||
300 | } | 304 | } |
301 | if ( -x $lsmod_file) { | 305 | if ( -x $lsmod_file) { |
302 | # the file is executable, run it | 306 | # the file is executable, run it |