Skip to content

Commit f597a71

Browse files
committed
kconfig/streamline_config.pl: directly access LSMOD from the environment
Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
1 parent 322a8b0 commit f597a71

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

‎scripts/kconfig/Makefile‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,9 @@ silentoldconfig: $(obj)/conf
3333
$(Q)mkdir -p include/generated
3434
$< --$@ $(Kconfig)
3535

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-
4436
localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
4537
$(Q)mkdir -p include/generated
46-
$(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config
38+
$(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
4739
$(Q)if [ -f .config ]; then \
4840
cmp -s .tmp.config .config || \
4941
(mv -f .config .config.old.1; \
@@ -58,7 +50,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
5850

5951
localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
6052
$(Q)mkdir -p include/generated
61-
$(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config
53+
$(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
6254
$(Q)sed -i s/=m/=y/ .tmp.config
6355
$(Q)if [ -f .config ]; then \
6456
cmp -s .tmp.config .config || \

‎scripts/kconfig/streamline_config.pl‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ sub find_config {
115115
# Get the build source and top level Kconfig file (passed in)
116116
my $ksource = $ARGV[0];
117117
my $kconfig = $ARGV[1];
118-
my $lsmod_file = $ARGV[2];
118+
my $lsmod_file = $ENV{'LSMOD'};
119119

120120
my @makefiles = `find $ksource -name Makefile 2>/dev/null`;
121121
chomp @makefiles;
@@ -296,7 +296,11 @@ sub read_kconfig {
296296

297297
if (defined($lsmod_file)) {
298298
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+
}
300304
}
301305
if ( -x $lsmod_file) {
302306
# the file is executable, run it

0 commit comments

Comments
 (0)