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.24; helo=mga09.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 1B87A211ADA52 for ; Mon, 14 Jan 2019 05:56:43 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2019 05:56:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,477,1539673200"; d="scan'208";a="266992747" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga004.jf.intel.com with ESMTP; 14 Jan 2019 05:56:43 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 14 Jan 2019 05:56:42 -0800 Received: from shsmsx152.ccr.corp.intel.com ([169.254.6.44]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.150]) with mapi id 14.03.0415.000; Mon, 14 Jan 2019 21:56:41 +0800 From: "Gao, Liming" To: "Feng, Bob C" , "edk2-devel@lists.01.org" CC: Laszlo Ersek Thread-Topic: [Patch] BaseTools: Remove EDK_SOURCE keyword Thread-Index: AQHUq/pB7tPDHRyLb0O7xdOkarqJq6Wuybmw Date: Mon, 14 Jan 2019 13:56:40 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3B167D@SHSMSX152.ccr.corp.intel.com> References: <20190114111341.20784-1-bob.c.feng@intel.com> In-Reply-To: <20190114111341.20784-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTY3YzdjMDYtOGE0My00NDE1LWFjMzYtNWE4NTFjYjI3ZTg5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTUxUdWFhQm9QeTNhV3lHSGUzZnBZOWNsMGZFOVJFQnFCK21WYktLMlwvWWlGODBPbktJUlIwclN0MFBBRkdOTFUifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Remove EDK_SOURCE keyword X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 13:56:44 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Bob: This change cleans up EDK environments in GenFds. Could you continue to c= lean up EDK env in ECC and UPT tool? Thanks Liming > -----Original Message----- > From: Feng, Bob C > Sent: Monday, January 14, 2019 7:14 PM > To: edk2-devel@lists.01.org > Cc: Feng, Bob C ; Gao, Liming ; Laszlo Ersek > Subject: [Patch] BaseTools: Remove EDK_SOURCE keyword >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1350 > Remove unused EDK_SOURCE keyword in python tool. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Bob Feng > Cc: Liming Gao > Cc: Laszlo Ersek > --- > BaseTools/Source/Python/GenFds/GenFds.py | 3 -- > .../Python/GenFds/GenFdsGlobalVariable.py | 3 -- > .../Source/Python/Workspace/InfBuildData.py | 34 ++++--------------- > 3 files changed, 7 insertions(+), 33 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/= Python/GenFds/GenFds.py > index 77383d3378..5a166bf455 100644 > --- a/BaseTools/Source/Python/GenFds/GenFds.py > +++ b/BaseTools/Source/Python/GenFds/GenFds.py > @@ -73,11 +73,10 @@ def resetFdsGlobalVariable(): > GenFdsGlobalVariable.FdfParser =3D None > GenFdsGlobalVariable.LibDir =3D '' > GenFdsGlobalVariable.WorkSpace =3D None > GenFdsGlobalVariable.WorkSpaceDir =3D '' > GenFdsGlobalVariable.ConfDir =3D '' > - GenFdsGlobalVariable.EdkSourceDir =3D '' > GenFdsGlobalVariable.OutputDirFromDscDict =3D {} > GenFdsGlobalVariable.TargetName =3D '' > GenFdsGlobalVariable.ToolChainTag =3D '' > GenFdsGlobalVariable.RuleDict =3D {} > GenFdsGlobalVariable.ArchList =3D None > @@ -141,12 +140,10 @@ def GenFdsApi(FdsCommandDict, WorkSpaceDataBase=3DN= one): > EdkLogger.error("GenFds", PARAMETER_INVALID, "WORKSPACE is i= nvalid", > ExtraData=3D"Please use '-w' switch to pass = it or set the WORKSPACE environment variable.") > else: > Workspace =3D os.path.normcase(FdsCommandDict.get("Workspace= ",os.environ.get('WORKSPACE'))) > GenFdsGlobalVariable.WorkSpaceDir =3D Workspace > - if 'EDK_SOURCE' in os.environ: > - GenFdsGlobalVariable.EdkSourceDir =3D os.path.normcase(o= s.environ['EDK_SOURCE']) > if FdsCommandDict.get("debug"): > GenFdsGlobalVariable.VerboseLogger("Using Workspace:" + = Workspace) > if FdsCommandDict.get("GenfdsMultiThread"): > GenFdsGlobalVariable.EnableGenfdsMultiThread =3D True > os.chdir(GenFdsGlobalVariable.WorkSpaceDir) > diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/Bas= eTools/Source/Python/GenFds/GenFdsGlobalVariable.py > index 51c9ab046c..febe0737a2 100644 > --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py > +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py > @@ -48,11 +48,10 @@ class GenFdsGlobalVariable: > FdfParser =3D None > LibDir =3D '' > WorkSpace =3D None > WorkSpaceDir =3D '' > ConfDir =3D '' > - EdkSourceDir =3D '' > OutputDirFromDscDict =3D {} > TargetName =3D '' > ToolChainTag =3D '' > RuleDict =3D {} > ArchList =3D None > @@ -338,11 +337,10 @@ class GenFdsGlobalVariable: > GenFdsGlobalVariable.WorkSpace =3D WorkSpace.Db > GenFdsGlobalVariable.ArchList =3D ArchList > GenFdsGlobalVariable.ToolChainTag =3D GlobalData.gGlobalDefines[= "TOOL_CHAIN_TAG"] > GenFdsGlobalVariable.TargetName =3D GlobalData.gGlobalDefines["T= ARGET"] > GenFdsGlobalVariable.ActivePlatform =3D GlobalData.gActivePlatfo= rm > - GenFdsGlobalVariable.EdkSourceDir =3D GlobalData.gGlobalDefines[= "EDK_SOURCE"] > GenFdsGlobalVariable.ConfDir =3D GlobalData.gConfDirectory > GenFdsGlobalVariable.EnableGenfdsMultiThread =3D GlobalData.gEna= bleGenfdsMultiThread > for Arch in ArchList: > GenFdsGlobalVariable.OutputDirDict[Arch] =3D os.path.normpat= h( > os.path.join(GlobalData.gWorkspace, > @@ -755,11 +753,10 @@ class GenFdsGlobalVariable: > def MacroExtend (Str, MacroDict=3D{}, Arch=3DDataType.TAB_COMMON): > if Str is None: > return None >=20 > Dict =3D {'$(WORKSPACE)': GenFdsGlobalVariable.WorkSpaceDir, > - '$(EDK_SOURCE)': GenFdsGlobalVariable.EdkSourceDir, > # '$(OUTPUT_DIRECTORY)': GenFdsGlobalVariable.OutputDirFr= omDsc, > '$(TARGET)': GenFdsGlobalVariable.TargetName, > '$(TOOL_CHAIN_TAG)': GenFdsGlobalVariable.ToolChainTag, > '$(SPACE)': ' ' > } > diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTool= s/Source/Python/Workspace/InfBuildData.py > index 02d6c1c756..709854de1e 100644 > --- a/BaseTools/Source/Python/Workspace/InfBuildData.py > +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py > @@ -634,38 +634,18 @@ class InfBuildData(ModuleBuildClassObject): >=20 > Macros =3D self._Macros > Macros['PROCESSOR'] =3D GlobalData.gEdkGlobal.get('PROCESSOR', s= elf._Arch) > RecordList =3D self._RawData[MODEL_EFI_INCLUDE, self._Arch, self= ._Platform] > for Record in RecordList: > - if Record[0].find('EDK_SOURCE') > -1: > - File =3D NormPath(Record[0], self._Macros) > - if File[0] =3D=3D '.': > - File =3D os.path.join(self._ModuleDir, File) > - else: > - File =3D os.path.join(GlobalData.gWorkspace, File) > - File =3D RealPath(os.path.normpath(File)) > - if File: > - RetVal.append(File) > - > - # TRICK: let compiler to choose correct header file > - File =3D NormPath(Record[0], self._Macros) > - if File[0] =3D=3D '.': > - File =3D os.path.join(self._ModuleDir, File) > - else: > - File =3D os.path.join(GlobalData.gWorkspace, File) > - File =3D RealPath(os.path.normpath(File)) > - if File: > - RetVal.append(File) > + File =3D NormPath(Record[0], Macros) > + if File[0] =3D=3D '.': > + File =3D os.path.join(self._ModuleDir, File) > else: > - File =3D NormPath(Record[0], Macros) > - if File[0] =3D=3D '.': > - File =3D os.path.join(self._ModuleDir, File) > - else: > - File =3D mws.join(GlobalData.gWorkspace, File) > - File =3D RealPath(os.path.normpath(File)) > - if File: > - RetVal.append(File) > + File =3D mws.join(GlobalData.gWorkspace, File) > + File =3D RealPath(os.path.normpath(File)) > + if File: > + RetVal.append(File) > return RetVal >=20 > ## Retrieve packages this module depends on > @cached_property > def Packages(self): > -- > 2.19.1.windows.1