From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Luis Rodriguez <Luis.Rodriguez@atheros.com>,
"sam@ravnborg.org" <sam@ravnborg.org>,
"greg@kroah.com" <greg@kroah.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"mcgrof@gmail.com" <mcgrof@gmail.com>
Subject: Re: [PATCH 2/4] kconfig: streamline_config.pl: fix out-of-tree builds
Date: Fri, 20 Nov 2009 08:46:33 -0800 [thread overview]
Message-ID: <20091120164633.GC13136@tux> (raw)
In-Reply-To: <1258732254-15573-3-git-send-email-alan-jenkins@tuffmail.co.uk>
On Fri, Nov 20, 2009 at 07:50:52AM -0800, Alan Jenkins wrote:
> We should look for Kconfig under $srctree, just like zconf.l does.
> This allows "make localmodconfig" to work when using a separate build
> directory (e.g. make O=../build).
>
> Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
> ---
> scripts/kconfig/streamline_config.pl | 10 +++++++---
> 1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
> index 7d898e3..7a7bcf7 100644
> --- a/scripts/kconfig/streamline_config.pl
> +++ b/scripts/kconfig/streamline_config.pl
> @@ -46,7 +46,7 @@ use warnings;
> # make oldconfig
> #
> my $config = ".config";
> -my $linuxpath = ".";
> +my $srctree = $ENV{"srctree"} || ".";
>
> my $uname = `uname -r`;
> chomp $uname;
> @@ -114,7 +114,7 @@ sub find_config {
>
> find_config;
>
> -my @makefiles = `find $linuxpath -name Makefile`;
> +my @makefiles = `find $srctree -name Makefile`;
> my %depends;
> my %selects;
> my %prompts;
> @@ -135,7 +135,11 @@ sub read_kconfig {
> my $config;
> my @kconfigs;
>
> - open(KIN, $kconfig) || die "Can't open $kconfig";
> + open(KIN, $kconfig) || (
> + $kconfig =~ "^[^/]" &&
> + open(KIN, $srctree . "/" . $kconfig)
> + ) || die "Can't open $kconfig";
> +
God I hate perl, can this be a little perl-un-obfuscated a bit?
Luis
next prev parent reply other threads:[~2009-11-20 16:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-20 15:50 [PATCH 0/4] kconfig: streamline_config.pl: optionally accept lsmod output Alan Jenkins
2009-11-20 15:50 ` [PATCH 1/4] kconfig: streamline_config.pl: "use strict" (and fix the errors) Alan Jenkins
2009-11-20 15:50 ` [PATCH 2/4] kconfig: streamline_config.pl: fix out-of-tree builds Alan Jenkins
2009-11-20 15:50 ` [PATCH 3/4] kconfig: streamline_config.pl: add handling for "if" statements in Kconfig Alan Jenkins
2009-11-20 15:50 ` [PATCH 4/4] kconfig: streamline_config.pl: let users specify the list of desired modules Alan Jenkins
2009-11-20 17:51 ` Luis R. Rodriguez
2009-11-20 16:46 ` Luis R. Rodriguez [this message]
2009-11-20 17:25 ` [PATCH 2/4] kconfig: streamline_config.pl: fix out-of-tree builds Alan Jenkins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091120164633.GC13136@tux \
--to=lrodriguez@atheros.com \
--cc=Luis.Rodriguez@atheros.com \
--cc=akpm@linux-foundation.org \
--cc=alan-jenkins@tuffmail.co.uk \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@gmail.com \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox