lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Nov 2009 08:46:33 -0800
From:	"Luis R. Rodriguez" <lrodriguez@...eros.com>
To:	Alan Jenkins <alan-jenkins@...fmail.co.uk>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Luis Rodriguez <Luis.Rodriguez@...eros.com>,
	"sam@...nborg.org" <sam@...nborg.org>,
	"greg@...ah.com" <greg@...ah.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"mcgrof@...il.com" <mcgrof@...il.com>
Subject: Re: [PATCH 2/4] kconfig: streamline_config.pl: fix out-of-tree
	builds

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@...fmail.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ