aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-11-20 09:21:12 -0500
committerSteven Rostedt <rostedt@goodmis.org>2009-11-20 09:45:55 -0500
commit463bf9000750e08a85ee0b40da3266aae8a54ba2 (patch)
tree5fb5b03c2350c514a6516a45a0fbd63cc9a76fe4 /scripts
parent648f4e3e50c4793d9dbf9a09afa193631f76fa26 (diff)
kconfig: Fix make O=<dir> local{mod,yes}config
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/Makefile4
-rw-r--r--scripts/kconfig/streamline_config.pl12
2 files changed, 8 insertions, 8 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 6d69c7ccdcc7..80599e3a7994 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -30,7 +30,7 @@ silentoldconfig: $(obj)/conf
30 $< -s $(Kconfig) 30 $< -s $(Kconfig)
31 31
32localmodconfig: $(obj)/streamline_config.pl $(obj)/conf 32localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
33 $(Q)perl $< $(Kconfig) > .tmp.config 33 $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
34 $(Q)if [ -f .config ]; then \ 34 $(Q)if [ -f .config ]; then \
35 cmp -s .tmp.config .config || \ 35 cmp -s .tmp.config .config || \
36 (mv -f .config .config.old.1; \ 36 (mv -f .config .config.old.1; \
@@ -44,7 +44,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
44 $(Q)rm -f .tmp.config 44 $(Q)rm -f .tmp.config
45 45
46localyesconfig: $(obj)/streamline_config.pl $(obj)/conf 46localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
47 $(Q)perl $< $(Kconfig) > .tmp.config 47 $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
48 $(Q)sed -i s/=m/=y/ .tmp.config 48 $(Q)sed -i s/=m/=y/ .tmp.config
49 $(Q)if [ -f .config ]; then \ 49 $(Q)if [ -f .config ]; then \
50 cmp -s .tmp.config .config || \ 50 cmp -s .tmp.config .config || \
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 95984db8e1e0..0d800820c3cd 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -43,7 +43,6 @@
43# make oldconfig 43# make oldconfig
44# 44#
45my $config = ".config"; 45my $config = ".config";
46my $linuxpath = ".";
47 46
48my $uname = `uname -r`; 47my $uname = `uname -r`;
49chomp $uname; 48chomp $uname;
@@ -111,7 +110,11 @@ sub find_config {
111 110
112find_config; 111find_config;
113 112
114my @makefiles = `find $linuxpath -name Makefile`; 113# Get the build source and top level Kconfig file (passed in)
114my $ksource = $ARGV[0];
115my $kconfig = $ARGV[1];
116
117my @makefiles = `find $ksource -name Makefile`;
115my %depends; 118my %depends;
116my %selects; 119my %selects;
117my %prompts; 120my %prompts;
@@ -119,9 +122,6 @@ my %objects;
119my $var; 122my $var;
120my $cont = 0; 123my $cont = 0;
121 124
122# Get the top level Kconfig file (passed in)
123my $kconfig = $ARGV[0];
124
125# prevent recursion 125# prevent recursion
126my %read_kconfigs; 126my %read_kconfigs;
127 127
@@ -132,7 +132,7 @@ sub read_kconfig {
132 my $config; 132 my $config;
133 my @kconfigs; 133 my @kconfigs;
134 134
135 open(KIN, $kconfig) || die "Can't open $kconfig"; 135 open(KIN, "$ksource/$kconfig") || die "Can't open $kconfig";
136 while (<KIN>) { 136 while (<KIN>) {
137 chomp; 137 chomp;
138 138