From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9E29B20349D86 for ; Sun, 12 Nov 2017 19:13:39 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Nov 2017 19:17:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,387,1505804400"; d="scan'208";a="6899782" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 12 Nov 2017 19:17:44 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 12 Nov 2017 19:17:44 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 12 Nov 2017 19:17:44 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.213]) with mapi id 14.03.0319.002; Mon, 13 Nov 2017 11:16:12 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Fix the bug to re-build uni file for Library Thread-Index: AQHTXCp0M6Yn41/K8kyEwR9l0wcteaMRoytw Date: Mon, 13 Nov 2017 03:16:11 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E17CDE5@SHSMSX104.ccr.corp.intel.com> References: <1510541529-19120-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1510541529-19120-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fix the bug to re-build uni file for Library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 03:13:39 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Zhu, Yonghong >Sent: Monday, November 13, 2017 10:52 AM >To: edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: [Patch] BaseTools: Fix the bug to re-build uni file for Library > >The root cause is Module's self.CanSkip() is before LibraryAutoGen, >then when a uni file of library is changed, Module's self.CanSkip() is >still true which cause the library is not regenerated. >This patch change Module's self.CanSkip() after LibraryAutoGen. > >Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=3D759 >Cc: Liming Gao >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Yonghong Zhu >--- > BaseTools/Source/Python/AutoGen/AutoGen.py | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py >b/BaseTools/Source/Python/AutoGen/AutoGen.py >index 5317921..b3e7089 100644 >--- a/BaseTools/Source/Python/AutoGen/AutoGen.py >+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py >@@ -4227,17 +4227,18 @@ class ModuleAutoGen(AutoGen): > if self.IsBinaryModule: > return > > if self.IsMakeFileCreated: > return >- if self.CanSkip(): >- return > > if not self.IsLibrary and CreateLibraryMakeFile: > for LibraryAutoGen in self.LibraryAutoGenList: > LibraryAutoGen.CreateMakeFile() > >+ if self.CanSkip(): >+ return >+ > if len(self.CustomMakefile) =3D=3D 0: > Makefile =3D GenMake.ModuleMakefile(self) > else: > Makefile =3D GenMake.CustomMakefile(self) > if Makefile.Generate(): >@@ -4261,12 +4262,10 @@ class ModuleAutoGen(AutoGen): > # dependent libraries will be c= reated > # > def CreateCodeFile(self, CreateLibraryCodeFile=3DTrue): > if self.IsCodeFileCreated: > return >- if self.CanSkip(): >- return > > # Need to generate PcdDatabase even PcdDriver is binarymodule > if self.IsBinaryModule and self.PcdIsDriver !=3D '': > CreatePcdDatabaseCode(self, TemplateString(), TemplateString(= )) > return >@@ -4277,10 +4276,13 @@ class ModuleAutoGen(AutoGen): > > if not self.IsLibrary and CreateLibraryCodeFile: > for LibraryAutoGen in self.LibraryAutoGenList: > LibraryAutoGen.CreateCodeFile() > >+ if self.CanSkip(): >+ return >+ > AutoGenList =3D [] > IgoredAutoGenList =3D [] > > for File in self.AutoGenFileList: > if GenC.Generate(File.Path, self.AutoGenFileList[File], File.= IsBinary): >-- >2.6.1.windows.1