From patchwork Fri Nov 20 15:12:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 61661 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAKFC4KY020324 for ; Fri, 20 Nov 2009 15:12:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752962AbZKTPL4 (ORCPT ); Fri, 20 Nov 2009 10:11:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753389AbZKTPL4 (ORCPT ); Fri, 20 Nov 2009 10:11:56 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:57344 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752962AbZKTPL4 (ORCPT ); Fri, 20 Nov 2009 10:11:56 -0500 Received: from [192.168.23.10] (really [74.67.89.75]) by hrndva-omta02.mail.rr.com with ESMTP id <20091120151201296.LRDH18187@hrndva-omta02.mail.rr.com>; Fri, 20 Nov 2009 15:12:01 +0000 Subject: [PATCH][GIT PULL] kconfig: Fix make O= local{mod,yes}config From: Steven Rostedt Reply-To: rostedt@goodmis.org To: LKML Cc: Linus Torvalds , Peter Zijlstra , Sam Ravnborg , linux-kbuild Organization: Kihon Technologies Inc. Date: Fri, 20 Nov 2009 10:12:00 -0500 Message-Id: <1258729920.22249.1028.camel@gandalf.stny.rr.com> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 6d69c7c..80599e3 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -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; \ @@ -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 || \ diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index 95984db..0d80082 100644 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl @@ -43,7 +43,6 @@ # make oldconfig # my $config = ".config"; -my $linuxpath = "."; my $uname = `uname -r`; chomp $uname; @@ -111,7 +110,11 @@ 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; @@ -119,9 +122,6 @@ my %objects; my $var; my $cont = 0; -# Get the top level Kconfig file (passed in) -my $kconfig = $ARGV[0]; - # prevent recursion my %read_kconfigs; @@ -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 () { chomp;