From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 2EE5321BBC415 for ; Thu, 22 Jun 2017 23:41:13 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 22 Jun 2017 23:42:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,376,1493708400"; d="scan'208";a="117907500" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 22 Jun 2017 23:42:38 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 22 Jun 2017 23:42:38 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 22 Jun 2017 23:42:38 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.146]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.122]) with mapi id 14.03.0319.002; Fri, 23 Jun 2017 14:42:36 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: support building the same INF more than once with -m option Thread-Index: AQHS4GBo3LsZjRdjPE+eLtb8/4ldPqIyFwCw Date: Fri, 23 Jun 2017 06:42:35 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D74DD61@shsmsx102.ccr.corp.intel.com> References: <1496930763-16536-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1496930763-16536-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: support building the same INF more than once with -m option 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: Fri, 23 Jun 2017 06:41:13 -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: Thursday, June 08, 2017 10:06 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: [Patch] BaseTools: support building the same INF more than once >with -m option > >Currently DSC file [Components] Section can support building the same >INF more than once for the same arch, this patch support build with -m >option to generate multiple instances. > >Cc: Liming Gao >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Yonghong Zhu >--- > BaseTools/Source/Python/build/build.py | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > >diff --git a/BaseTools/Source/Python/build/build.py >b/BaseTools/Source/Python/build/build.py >index fd94ae6..ae8aa2f 100644 >--- a/BaseTools/Source/Python/build/build.py >+++ b/BaseTools/Source/Python/build/build.py >@@ -1734,16 +1734,19 @@ class Build(): > Wa.CreateMakeFile(False) > self.Progress.Stop("done!") > MaList =3D [] > for Arch in Wa.ArchList: > GlobalData.gGlobalDefines['ARCH'] =3D Arch >- Ma =3D ModuleAutoGen(Wa, self.ModuleFile, BuildTarget= , ToolChain, >Arch, self.PlatformFile) >- if Ma =3D=3D None: continue >- MaList.append(Ma) >- self.BuildModules.append(Ma) >- if not Ma.IsBinaryModule: >- self._Build(self.Target, Ma, BuildModule=3DTrue) >+ Pa =3D PlatformAutoGen(Wa, self.PlatformFile, BuildTa= rget, >ToolChain, Arch) >+ for Module in Pa.Platform.Modules: >+ if self.ModuleFile.Dir =3D=3D Module.Dir and self= .ModuleFile.File =3D=3D >Module.File: >+ Ma =3D ModuleAutoGen(Wa, Module, BuildTarget,= ToolChain, >Arch, self.PlatformFile) >+ if Ma =3D=3D None: continue >+ MaList.append(Ma) >+ self.BuildModules.append(Ma) >+ if not Ma.IsBinaryModule: >+ self._Build(self.Target, Ma, BuildModule= =3DTrue) > > self.BuildReport.AddPlatformReport(Wa, MaList) > if MaList =3D=3D []: > EdkLogger.error( > 'build', >-- >2.6.1.windows.1