From patchwork Fri Jul 1 23:31:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 939552 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p61NWRS5008108 for ; Fri, 1 Jul 2011 23:32:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758126Ab1GAXbg (ORCPT ); Fri, 1 Jul 2011 19:31:36 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:57845 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758114Ab1GAXbd (ORCPT ); Fri, 1 Jul 2011 19:31:33 -0400 Received: by mail-iy0-f174.google.com with SMTP id 12so3173064iyb.19 for ; Fri, 01 Jul 2011 16:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=AcJt2uZeSNvmUMPhlRTF1kxybB3oJcrQP3e+2a1qa9g=; b=L+zrCSehfzsFq4c3eBe4Xr36O+CF2ZG3ZQq3mRQYYfoLeyGhdaaPy5MvWzzztgbR/+ lsECed2Tm3G+JKZPhx6c4ELQQR5YBbSF0hyk165zQLe9husZT2lj0lKlDAIv7+4Ohb2I 1uk6/Xv+BCswQRDj++Cs41xZRjBRblQA3AlS0= Received: by 10.43.47.134 with SMTP id us6mr4410499icb.10.1309563093269; Fri, 01 Jul 2011 16:31:33 -0700 (PDT) Received: from localhost.localdomain (69-165-144-226.dsl.teksavvy.com [69.165.144.226]) by mx.google.com with ESMTPS id hp8sm3820881icc.11.2011.07.01.16.31.32 (version=SSLv3 cipher=OTHER); Fri, 01 Jul 2011 16:31:32 -0700 (PDT) From: Arnaud Lacombe To: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michal Marek , Arnaud Lacombe , Steven Rostedt Subject: [RFC 2/4] kconfig/streamline_config.pl: directly access LSMOD Date: Fri, 1 Jul 2011 19:31:14 -0400 Message-Id: <1309563076-5050-3-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.3.4.574.g608b.dirty In-Reply-To: <1309563076-5050-1-git-send-email-lacombar@gmail.com> References: <1309563076-5050-1-git-send-email-lacombar@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 01 Jul 2011 23:32:51 +0000 (UTC) Cc: Steven Rostedt --- scripts/kconfig/Makefile | 12 ++---------- scripts/kconfig/streamline_config.pl | 8 ++++++-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 84abb2f..a718b3c 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -33,17 +33,9 @@ silentoldconfig: $(obj)/conf $(Q)mkdir -p include/generated $< --$@ $(Kconfig) -# if no path is given, then use src directory to find file -ifdef LSMOD -LSMOD_F := $(LSMOD) -ifeq ($(findstring /,$(LSMOD)),) - LSMOD_F := $(objtree)/$(LSMOD) -endif -endif - localmodconfig: $(obj)/streamline_config.pl $(obj)/conf $(Q)mkdir -p include/generated - $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config + $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config $(Q)if [ -f .config ]; then \ cmp -s .tmp.config .config || \ (mv -f .config .config.old.1; \ @@ -58,7 +50,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf localyesconfig: $(obj)/streamline_config.pl $(obj)/conf $(Q)mkdir -p include/generated - $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .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 a4fe923..ae34d20 100644 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl @@ -115,7 +115,7 @@ find_config; # Get the build source and top level Kconfig file (passed in) my $ksource = $ARGV[0]; my $kconfig = $ARGV[1]; -my $lsmod_file = $ARGV[2]; +my $lsmod_file = $ENV{'LSMOD'}; my @makefiles = `find $ksource -name Makefile 2>/dev/null`; chomp @makefiles; @@ -296,7 +296,11 @@ my %modules; if (defined($lsmod_file)) { if ( ! -f $lsmod_file) { - die "$lsmod_file not found"; + if ( -f $ENV{'objtree'}."/".$lsmod_file) { + $lsmod_file = $ENV{'objtree'}."/".$lsmod_file; + } else { + die "$lsmod_file not found"; + } } if ( -x $lsmod_file) { # the file is executable, run it