Skip to content

Commit

Permalink
kconfig/streamline_config.pl: directly access LSMOD from the environment
Browse files Browse the repository at this point in the history
Cc: Steven Rostedt <[email protected]>
Signed-off-by: Arnaud Lacombe <[email protected]>
  • Loading branch information
lacombar committed Aug 8, 2011
1 parent 322a8b0 commit f597a71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
12 changes: 2 additions & 10 deletions scripts/kconfig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand All @@ -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 || \
Expand Down
8 changes: 6 additions & 2 deletions scripts/kconfig/streamline_config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f597a71

Please sign in to comment.