Skip to content

Commit

Permalink
kconfig: Fix make O=<dir> local{mod,yes}config
Browse files Browse the repository at this point in the history
When the output directory is something other than the kernel source,
the streamline_config script gets confused. This patch passes in the
source directory to the script so that it can find the proper files.

Reported-by: Peter Zijlstra <peterz@infradead.org>
Tested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt authored and rostedt committed Nov 20, 2009
1 parent 648f4e3 commit 463bf90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions scripts/kconfig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ silentoldconfig: $(obj)/conf
$< -s $(Kconfig)

localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
$(Q)perl $< $(Kconfig) > .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 @@ -44,7 +44,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
$(Q)rm -f .tmp.config

localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
$(Q)perl $< $(Kconfig) > .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
12 changes: 6 additions & 6 deletions scripts/kconfig/streamline_config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
# make oldconfig
#
my $config = ".config";
my $linuxpath = ".";

my $uname = `uname -r`;
chomp $uname;
Expand Down Expand Up @@ -111,17 +110,18 @@ sub find_config {

find_config;

my @makefiles = `find $linuxpath -name Makefile`;
# Get the build source and top level Kconfig file (passed in)
my $ksource = $ARGV[0];
my $kconfig = $ARGV[1];

my @makefiles = `find $ksource -name Makefile`;
my %depends;
my %selects;
my %prompts;
my %objects;
my $var;
my $cont = 0;

# Get the top level Kconfig file (passed in)
my $kconfig = $ARGV[0];

# prevent recursion
my %read_kconfigs;

Expand All @@ -132,7 +132,7 @@ sub read_kconfig {
my $config;
my @kconfigs;

open(KIN, $kconfig) || die "Can't open $kconfig";
open(KIN, "$ksource/$kconfig") || die "Can't open $kconfig";
while (<KIN>) {
chomp;

Expand Down

0 comments on commit 463bf90

Please sign in to comment.