* [Patch] BaseTools: Remove EDK_SOURCE keyword @ 2019-01-14 11:13 Feng, Bob C 2019-01-14 13:56 ` Gao, Liming 0 siblings, 1 reply; 4+ messages in thread From: Feng, Bob C @ 2019-01-14 11:13 UTC (permalink / raw) To: edk2-devel; +Cc: Bob Feng, Liming Gao, Laszlo Ersek BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 Remove unused EDK_SOURCE keyword in python tool. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> --- 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(-) 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 = None GenFdsGlobalVariable.LibDir = '' GenFdsGlobalVariable.WorkSpace = None GenFdsGlobalVariable.WorkSpaceDir = '' GenFdsGlobalVariable.ConfDir = '' - GenFdsGlobalVariable.EdkSourceDir = '' GenFdsGlobalVariable.OutputDirFromDscDict = {} GenFdsGlobalVariable.TargetName = '' GenFdsGlobalVariable.ToolChainTag = '' GenFdsGlobalVariable.RuleDict = {} GenFdsGlobalVariable.ArchList = None @@ -141,12 +140,10 @@ def GenFdsApi(FdsCommandDict, WorkSpaceDataBase=None): EdkLogger.error("GenFds", PARAMETER_INVALID, "WORKSPACE is invalid", ExtraData="Please use '-w' switch to pass it or set the WORKSPACE environment variable.") else: Workspace = os.path.normcase(FdsCommandDict.get("Workspace",os.environ.get('WORKSPACE'))) GenFdsGlobalVariable.WorkSpaceDir = Workspace - if 'EDK_SOURCE' in os.environ: - GenFdsGlobalVariable.EdkSourceDir = os.path.normcase(os.environ['EDK_SOURCE']) if FdsCommandDict.get("debug"): GenFdsGlobalVariable.VerboseLogger("Using Workspace:" + Workspace) if FdsCommandDict.get("GenfdsMultiThread"): GenFdsGlobalVariable.EnableGenfdsMultiThread = True os.chdir(GenFdsGlobalVariable.WorkSpaceDir) diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/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 = None LibDir = '' WorkSpace = None WorkSpaceDir = '' ConfDir = '' - EdkSourceDir = '' OutputDirFromDscDict = {} TargetName = '' ToolChainTag = '' RuleDict = {} ArchList = None @@ -338,11 +337,10 @@ class GenFdsGlobalVariable: GenFdsGlobalVariable.WorkSpace = WorkSpace.Db GenFdsGlobalVariable.ArchList = ArchList GenFdsGlobalVariable.ToolChainTag = GlobalData.gGlobalDefines["TOOL_CHAIN_TAG"] GenFdsGlobalVariable.TargetName = GlobalData.gGlobalDefines["TARGET"] GenFdsGlobalVariable.ActivePlatform = GlobalData.gActivePlatform - GenFdsGlobalVariable.EdkSourceDir = GlobalData.gGlobalDefines["EDK_SOURCE"] GenFdsGlobalVariable.ConfDir = GlobalData.gConfDirectory GenFdsGlobalVariable.EnableGenfdsMultiThread = GlobalData.gEnableGenfdsMultiThread for Arch in ArchList: GenFdsGlobalVariable.OutputDirDict[Arch] = os.path.normpath( os.path.join(GlobalData.gWorkspace, @@ -755,11 +753,10 @@ class GenFdsGlobalVariable: def MacroExtend (Str, MacroDict={}, Arch=DataType.TAB_COMMON): if Str is None: return None Dict = {'$(WORKSPACE)': GenFdsGlobalVariable.WorkSpaceDir, - '$(EDK_SOURCE)': GenFdsGlobalVariable.EdkSourceDir, # '$(OUTPUT_DIRECTORY)': GenFdsGlobalVariable.OutputDirFromDsc, '$(TARGET)': GenFdsGlobalVariable.TargetName, '$(TOOL_CHAIN_TAG)': GenFdsGlobalVariable.ToolChainTag, '$(SPACE)': ' ' } diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/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): Macros = self._Macros Macros['PROCESSOR'] = GlobalData.gEdkGlobal.get('PROCESSOR', self._Arch) RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch, self._Platform] for Record in RecordList: - if Record[0].find('EDK_SOURCE') > -1: - File = NormPath(Record[0], self._Macros) - if File[0] == '.': - File = os.path.join(self._ModuleDir, File) - else: - File = os.path.join(GlobalData.gWorkspace, File) - File = RealPath(os.path.normpath(File)) - if File: - RetVal.append(File) - - # TRICK: let compiler to choose correct header file - File = NormPath(Record[0], self._Macros) - if File[0] == '.': - File = os.path.join(self._ModuleDir, File) - else: - File = os.path.join(GlobalData.gWorkspace, File) - File = RealPath(os.path.normpath(File)) - if File: - RetVal.append(File) + File = NormPath(Record[0], Macros) + if File[0] == '.': + File = os.path.join(self._ModuleDir, File) else: - File = NormPath(Record[0], Macros) - if File[0] == '.': - File = os.path.join(self._ModuleDir, File) - else: - File = mws.join(GlobalData.gWorkspace, File) - File = RealPath(os.path.normpath(File)) - if File: - RetVal.append(File) + File = mws.join(GlobalData.gWorkspace, File) + File = RealPath(os.path.normpath(File)) + if File: + RetVal.append(File) return RetVal ## Retrieve packages this module depends on @cached_property def Packages(self): -- 2.19.1.windows.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Patch] BaseTools: Remove EDK_SOURCE keyword 2019-01-14 11:13 [Patch] BaseTools: Remove EDK_SOURCE keyword Feng, Bob C @ 2019-01-14 13:56 ` Gao, Liming 2019-01-14 14:03 ` Feng, Bob C 0 siblings, 1 reply; 4+ messages in thread From: Gao, Liming @ 2019-01-14 13:56 UTC (permalink / raw) To: Feng, Bob C, edk2-devel@lists.01.org; +Cc: Laszlo Ersek Bob: This change cleans up EDK environments in GenFds. Could you continue to clean 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 <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Laszlo Ersek <lersek@redhat.com> > Subject: [Patch] BaseTools: Remove EDK_SOURCE keyword > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 > Remove unused EDK_SOURCE keyword in python tool. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Bob Feng <bob.c.feng@intel.com> > Cc: Liming Gao <liming.gao@intel.com> > Cc: Laszlo Ersek <lersek@redhat.com> > --- > 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(-) > > 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 = None > GenFdsGlobalVariable.LibDir = '' > GenFdsGlobalVariable.WorkSpace = None > GenFdsGlobalVariable.WorkSpaceDir = '' > GenFdsGlobalVariable.ConfDir = '' > - GenFdsGlobalVariable.EdkSourceDir = '' > GenFdsGlobalVariable.OutputDirFromDscDict = {} > GenFdsGlobalVariable.TargetName = '' > GenFdsGlobalVariable.ToolChainTag = '' > GenFdsGlobalVariable.RuleDict = {} > GenFdsGlobalVariable.ArchList = None > @@ -141,12 +140,10 @@ def GenFdsApi(FdsCommandDict, WorkSpaceDataBase=None): > EdkLogger.error("GenFds", PARAMETER_INVALID, "WORKSPACE is invalid", > ExtraData="Please use '-w' switch to pass it or set the WORKSPACE environment variable.") > else: > Workspace = os.path.normcase(FdsCommandDict.get("Workspace",os.environ.get('WORKSPACE'))) > GenFdsGlobalVariable.WorkSpaceDir = Workspace > - if 'EDK_SOURCE' in os.environ: > - GenFdsGlobalVariable.EdkSourceDir = os.path.normcase(os.environ['EDK_SOURCE']) > if FdsCommandDict.get("debug"): > GenFdsGlobalVariable.VerboseLogger("Using Workspace:" + Workspace) > if FdsCommandDict.get("GenfdsMultiThread"): > GenFdsGlobalVariable.EnableGenfdsMultiThread = True > os.chdir(GenFdsGlobalVariable.WorkSpaceDir) > diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/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 = None > LibDir = '' > WorkSpace = None > WorkSpaceDir = '' > ConfDir = '' > - EdkSourceDir = '' > OutputDirFromDscDict = {} > TargetName = '' > ToolChainTag = '' > RuleDict = {} > ArchList = None > @@ -338,11 +337,10 @@ class GenFdsGlobalVariable: > GenFdsGlobalVariable.WorkSpace = WorkSpace.Db > GenFdsGlobalVariable.ArchList = ArchList > GenFdsGlobalVariable.ToolChainTag = GlobalData.gGlobalDefines["TOOL_CHAIN_TAG"] > GenFdsGlobalVariable.TargetName = GlobalData.gGlobalDefines["TARGET"] > GenFdsGlobalVariable.ActivePlatform = GlobalData.gActivePlatform > - GenFdsGlobalVariable.EdkSourceDir = GlobalData.gGlobalDefines["EDK_SOURCE"] > GenFdsGlobalVariable.ConfDir = GlobalData.gConfDirectory > GenFdsGlobalVariable.EnableGenfdsMultiThread = GlobalData.gEnableGenfdsMultiThread > for Arch in ArchList: > GenFdsGlobalVariable.OutputDirDict[Arch] = os.path.normpath( > os.path.join(GlobalData.gWorkspace, > @@ -755,11 +753,10 @@ class GenFdsGlobalVariable: > def MacroExtend (Str, MacroDict={}, Arch=DataType.TAB_COMMON): > if Str is None: > return None > > Dict = {'$(WORKSPACE)': GenFdsGlobalVariable.WorkSpaceDir, > - '$(EDK_SOURCE)': GenFdsGlobalVariable.EdkSourceDir, > # '$(OUTPUT_DIRECTORY)': GenFdsGlobalVariable.OutputDirFromDsc, > '$(TARGET)': GenFdsGlobalVariable.TargetName, > '$(TOOL_CHAIN_TAG)': GenFdsGlobalVariable.ToolChainTag, > '$(SPACE)': ' ' > } > diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/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): > > Macros = self._Macros > Macros['PROCESSOR'] = GlobalData.gEdkGlobal.get('PROCESSOR', self._Arch) > RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch, self._Platform] > for Record in RecordList: > - if Record[0].find('EDK_SOURCE') > -1: > - File = NormPath(Record[0], self._Macros) > - if File[0] == '.': > - File = os.path.join(self._ModuleDir, File) > - else: > - File = os.path.join(GlobalData.gWorkspace, File) > - File = RealPath(os.path.normpath(File)) > - if File: > - RetVal.append(File) > - > - # TRICK: let compiler to choose correct header file > - File = NormPath(Record[0], self._Macros) > - if File[0] == '.': > - File = os.path.join(self._ModuleDir, File) > - else: > - File = os.path.join(GlobalData.gWorkspace, File) > - File = RealPath(os.path.normpath(File)) > - if File: > - RetVal.append(File) > + File = NormPath(Record[0], Macros) > + if File[0] == '.': > + File = os.path.join(self._ModuleDir, File) > else: > - File = NormPath(Record[0], Macros) > - if File[0] == '.': > - File = os.path.join(self._ModuleDir, File) > - else: > - File = mws.join(GlobalData.gWorkspace, File) > - File = RealPath(os.path.normpath(File)) > - if File: > - RetVal.append(File) > + File = mws.join(GlobalData.gWorkspace, File) > + File = RealPath(os.path.normpath(File)) > + if File: > + RetVal.append(File) > return RetVal > > ## Retrieve packages this module depends on > @cached_property > def Packages(self): > -- > 2.19.1.windows.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch] BaseTools: Remove EDK_SOURCE keyword 2019-01-14 13:56 ` Gao, Liming @ 2019-01-14 14:03 ` Feng, Bob C 2019-01-14 14:44 ` Laszlo Ersek 0 siblings, 1 reply; 4+ messages in thread From: Feng, Bob C @ 2019-01-14 14:03 UTC (permalink / raw) To: Gao, Liming, edk2-devel@lists.01.org; +Cc: Laszlo Ersek Sure. Since ECC and UPT are two standalone tools, I'll send another patch for them. -----Original Message----- From: Gao, Liming Sent: Monday, January 14, 2019 9:57 PM To: Feng, Bob C <bob.c.feng@intel.com>; edk2-devel@lists.01.org Cc: Laszlo Ersek <lersek@redhat.com> Subject: RE: [Patch] BaseTools: Remove EDK_SOURCE keyword Bob: This change cleans up EDK environments in GenFds. Could you continue to clean 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 <bob.c.feng@intel.com>; Gao, Liming > <liming.gao@intel.com>; Laszlo Ersek <lersek@redhat.com> > Subject: [Patch] BaseTools: Remove EDK_SOURCE keyword > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 > Remove unused EDK_SOURCE keyword in python tool. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Bob Feng <bob.c.feng@intel.com> > Cc: Liming Gao <liming.gao@intel.com> > Cc: Laszlo Ersek <lersek@redhat.com> > --- > 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(-) > > 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 = None > GenFdsGlobalVariable.LibDir = '' > GenFdsGlobalVariable.WorkSpace = None > GenFdsGlobalVariable.WorkSpaceDir = '' > GenFdsGlobalVariable.ConfDir = '' > - GenFdsGlobalVariable.EdkSourceDir = '' > GenFdsGlobalVariable.OutputDirFromDscDict = {} > GenFdsGlobalVariable.TargetName = '' > GenFdsGlobalVariable.ToolChainTag = '' > GenFdsGlobalVariable.RuleDict = {} > GenFdsGlobalVariable.ArchList = None @@ -141,12 +140,10 @@ def > GenFdsApi(FdsCommandDict, WorkSpaceDataBase=None): > EdkLogger.error("GenFds", PARAMETER_INVALID, "WORKSPACE is invalid", > ExtraData="Please use '-w' switch to pass it or set the WORKSPACE environment variable.") > else: > Workspace = os.path.normcase(FdsCommandDict.get("Workspace",os.environ.get('WORKSPACE'))) > GenFdsGlobalVariable.WorkSpaceDir = Workspace > - if 'EDK_SOURCE' in os.environ: > - GenFdsGlobalVariable.EdkSourceDir = os.path.normcase(os.environ['EDK_SOURCE']) > if FdsCommandDict.get("debug"): > GenFdsGlobalVariable.VerboseLogger("Using Workspace:" + Workspace) > if FdsCommandDict.get("GenfdsMultiThread"): > GenFdsGlobalVariable.EnableGenfdsMultiThread = True > os.chdir(GenFdsGlobalVariable.WorkSpaceDir) > diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py > b/BaseTools/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 = None > LibDir = '' > WorkSpace = None > WorkSpaceDir = '' > ConfDir = '' > - EdkSourceDir = '' > OutputDirFromDscDict = {} > TargetName = '' > ToolChainTag = '' > RuleDict = {} > ArchList = None > @@ -338,11 +337,10 @@ class GenFdsGlobalVariable: > GenFdsGlobalVariable.WorkSpace = WorkSpace.Db > GenFdsGlobalVariable.ArchList = ArchList > GenFdsGlobalVariable.ToolChainTag = GlobalData.gGlobalDefines["TOOL_CHAIN_TAG"] > GenFdsGlobalVariable.TargetName = GlobalData.gGlobalDefines["TARGET"] > GenFdsGlobalVariable.ActivePlatform = GlobalData.gActivePlatform > - GenFdsGlobalVariable.EdkSourceDir = GlobalData.gGlobalDefines["EDK_SOURCE"] > GenFdsGlobalVariable.ConfDir = GlobalData.gConfDirectory > GenFdsGlobalVariable.EnableGenfdsMultiThread = GlobalData.gEnableGenfdsMultiThread > for Arch in ArchList: > GenFdsGlobalVariable.OutputDirDict[Arch] = os.path.normpath( > os.path.join(GlobalData.gWorkspace, > @@ -755,11 +753,10 @@ class GenFdsGlobalVariable: > def MacroExtend (Str, MacroDict={}, Arch=DataType.TAB_COMMON): > if Str is None: > return None > > Dict = {'$(WORKSPACE)': GenFdsGlobalVariable.WorkSpaceDir, > - '$(EDK_SOURCE)': GenFdsGlobalVariable.EdkSourceDir, > # '$(OUTPUT_DIRECTORY)': GenFdsGlobalVariable.OutputDirFromDsc, > '$(TARGET)': GenFdsGlobalVariable.TargetName, > '$(TOOL_CHAIN_TAG)': GenFdsGlobalVariable.ToolChainTag, > '$(SPACE)': ' ' > } > diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py > b/BaseTools/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): > > Macros = self._Macros > Macros['PROCESSOR'] = GlobalData.gEdkGlobal.get('PROCESSOR', self._Arch) > RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch, self._Platform] > for Record in RecordList: > - if Record[0].find('EDK_SOURCE') > -1: > - File = NormPath(Record[0], self._Macros) > - if File[0] == '.': > - File = os.path.join(self._ModuleDir, File) > - else: > - File = os.path.join(GlobalData.gWorkspace, File) > - File = RealPath(os.path.normpath(File)) > - if File: > - RetVal.append(File) > - > - # TRICK: let compiler to choose correct header file > - File = NormPath(Record[0], self._Macros) > - if File[0] == '.': > - File = os.path.join(self._ModuleDir, File) > - else: > - File = os.path.join(GlobalData.gWorkspace, File) > - File = RealPath(os.path.normpath(File)) > - if File: > - RetVal.append(File) > + File = NormPath(Record[0], Macros) > + if File[0] == '.': > + File = os.path.join(self._ModuleDir, File) > else: > - File = NormPath(Record[0], Macros) > - if File[0] == '.': > - File = os.path.join(self._ModuleDir, File) > - else: > - File = mws.join(GlobalData.gWorkspace, File) > - File = RealPath(os.path.normpath(File)) > - if File: > - RetVal.append(File) > + File = mws.join(GlobalData.gWorkspace, File) > + File = RealPath(os.path.normpath(File)) > + if File: > + RetVal.append(File) > return RetVal > > ## Retrieve packages this module depends on > @cached_property > def Packages(self): > -- > 2.19.1.windows.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch] BaseTools: Remove EDK_SOURCE keyword 2019-01-14 14:03 ` Feng, Bob C @ 2019-01-14 14:44 ` Laszlo Ersek 0 siblings, 0 replies; 4+ messages in thread From: Laszlo Ersek @ 2019-01-14 14:44 UTC (permalink / raw) To: Feng, Bob C, Gao, Liming, edk2-devel@lists.01.org On 01/14/19 15:03, Feng, Bob C wrote: > Sure. Since ECC and UPT are two standalone tools, I'll send another patch for them. That sounds like a good idea to me, but shouldn't we then split this patch as well? Namely, the first two hunks apply to GenFds. So, for those, I would suggest a common patch, and a subject like BaseTools/GenFds: remove EDK_SOURCE keyword However, the last hunk applies to "Workspace/InfBuildData.py". What utility does that file belong to? "build" perhaps? What would be the correct subject for the patch? I mean, if these three hunks belong together, that's OK (and then they should be in a single patch), but the subject line, as-is, is too generic. We should say something more specifc than just "BaseTools" -- we're not covering UPT or ECC, and those are also under BaseTools. Other than that, the patch works for me: Tested-by: Laszlo Ersek <lersek@redhat.com> But please don't push it without updating the subject line at least. Thanks Laszlo > -----Original Message----- > From: Gao, Liming > Sent: Monday, January 14, 2019 9:57 PM > To: Feng, Bob C <bob.c.feng@intel.com>; edk2-devel@lists.01.org > Cc: Laszlo Ersek <lersek@redhat.com> > Subject: RE: [Patch] BaseTools: Remove EDK_SOURCE keyword > > Bob: > This change cleans up EDK environments in GenFds. Could you continue to clean 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 <bob.c.feng@intel.com>; Gao, Liming >> <liming.gao@intel.com>; Laszlo Ersek <lersek@redhat.com> >> Subject: [Patch] BaseTools: Remove EDK_SOURCE keyword >> >> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 >> Remove unused EDK_SOURCE keyword in python tool. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Bob Feng <bob.c.feng@intel.com> >> Cc: Liming Gao <liming.gao@intel.com> >> Cc: Laszlo Ersek <lersek@redhat.com> >> --- >> 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(-) >> >> 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 = None >> GenFdsGlobalVariable.LibDir = '' >> GenFdsGlobalVariable.WorkSpace = None >> GenFdsGlobalVariable.WorkSpaceDir = '' >> GenFdsGlobalVariable.ConfDir = '' >> - GenFdsGlobalVariable.EdkSourceDir = '' >> GenFdsGlobalVariable.OutputDirFromDscDict = {} >> GenFdsGlobalVariable.TargetName = '' >> GenFdsGlobalVariable.ToolChainTag = '' >> GenFdsGlobalVariable.RuleDict = {} >> GenFdsGlobalVariable.ArchList = None @@ -141,12 +140,10 @@ def >> GenFdsApi(FdsCommandDict, WorkSpaceDataBase=None): >> EdkLogger.error("GenFds", PARAMETER_INVALID, "WORKSPACE is invalid", >> ExtraData="Please use '-w' switch to pass it or set the WORKSPACE environment variable.") >> else: >> Workspace = os.path.normcase(FdsCommandDict.get("Workspace",os.environ.get('WORKSPACE'))) >> GenFdsGlobalVariable.WorkSpaceDir = Workspace >> - if 'EDK_SOURCE' in os.environ: >> - GenFdsGlobalVariable.EdkSourceDir = os.path.normcase(os.environ['EDK_SOURCE']) >> if FdsCommandDict.get("debug"): >> GenFdsGlobalVariable.VerboseLogger("Using Workspace:" + Workspace) >> if FdsCommandDict.get("GenfdsMultiThread"): >> GenFdsGlobalVariable.EnableGenfdsMultiThread = True >> os.chdir(GenFdsGlobalVariable.WorkSpaceDir) >> diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py >> b/BaseTools/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 = None >> LibDir = '' >> WorkSpace = None >> WorkSpaceDir = '' >> ConfDir = '' >> - EdkSourceDir = '' >> OutputDirFromDscDict = {} >> TargetName = '' >> ToolChainTag = '' >> RuleDict = {} >> ArchList = None >> @@ -338,11 +337,10 @@ class GenFdsGlobalVariable: >> GenFdsGlobalVariable.WorkSpace = WorkSpace.Db >> GenFdsGlobalVariable.ArchList = ArchList >> GenFdsGlobalVariable.ToolChainTag = GlobalData.gGlobalDefines["TOOL_CHAIN_TAG"] >> GenFdsGlobalVariable.TargetName = GlobalData.gGlobalDefines["TARGET"] >> GenFdsGlobalVariable.ActivePlatform = GlobalData.gActivePlatform >> - GenFdsGlobalVariable.EdkSourceDir = GlobalData.gGlobalDefines["EDK_SOURCE"] >> GenFdsGlobalVariable.ConfDir = GlobalData.gConfDirectory >> GenFdsGlobalVariable.EnableGenfdsMultiThread = GlobalData.gEnableGenfdsMultiThread >> for Arch in ArchList: >> GenFdsGlobalVariable.OutputDirDict[Arch] = os.path.normpath( >> os.path.join(GlobalData.gWorkspace, >> @@ -755,11 +753,10 @@ class GenFdsGlobalVariable: >> def MacroExtend (Str, MacroDict={}, Arch=DataType.TAB_COMMON): >> if Str is None: >> return None >> >> Dict = {'$(WORKSPACE)': GenFdsGlobalVariable.WorkSpaceDir, >> - '$(EDK_SOURCE)': GenFdsGlobalVariable.EdkSourceDir, >> # '$(OUTPUT_DIRECTORY)': GenFdsGlobalVariable.OutputDirFromDsc, >> '$(TARGET)': GenFdsGlobalVariable.TargetName, >> '$(TOOL_CHAIN_TAG)': GenFdsGlobalVariable.ToolChainTag, >> '$(SPACE)': ' ' >> } >> diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py >> b/BaseTools/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): >> >> Macros = self._Macros >> Macros['PROCESSOR'] = GlobalData.gEdkGlobal.get('PROCESSOR', self._Arch) >> RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch, self._Platform] >> for Record in RecordList: >> - if Record[0].find('EDK_SOURCE') > -1: >> - File = NormPath(Record[0], self._Macros) >> - if File[0] == '.': >> - File = os.path.join(self._ModuleDir, File) >> - else: >> - File = os.path.join(GlobalData.gWorkspace, File) >> - File = RealPath(os.path.normpath(File)) >> - if File: >> - RetVal.append(File) >> - >> - # TRICK: let compiler to choose correct header file >> - File = NormPath(Record[0], self._Macros) >> - if File[0] == '.': >> - File = os.path.join(self._ModuleDir, File) >> - else: >> - File = os.path.join(GlobalData.gWorkspace, File) >> - File = RealPath(os.path.normpath(File)) >> - if File: >> - RetVal.append(File) >> + File = NormPath(Record[0], Macros) >> + if File[0] == '.': >> + File = os.path.join(self._ModuleDir, File) >> else: >> - File = NormPath(Record[0], Macros) >> - if File[0] == '.': >> - File = os.path.join(self._ModuleDir, File) >> - else: >> - File = mws.join(GlobalData.gWorkspace, File) >> - File = RealPath(os.path.normpath(File)) >> - if File: >> - RetVal.append(File) >> + File = mws.join(GlobalData.gWorkspace, File) >> + File = RealPath(os.path.normpath(File)) >> + if File: >> + RetVal.append(File) >> return RetVal >> >> ## Retrieve packages this module depends on >> @cached_property >> def Packages(self): >> -- >> 2.19.1.windows.1 > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-14 14:44 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-01-14 11:13 [Patch] BaseTools: Remove EDK_SOURCE keyword Feng, Bob C 2019-01-14 13:56 ` Gao, Liming 2019-01-14 14:03 ` Feng, Bob C 2019-01-14 14:44 ` Laszlo Ersek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox