diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2019-01-15 17:43:11 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-01-17 19:49:20 +0800 |
commit | 0006d3fd0f82b88e421594ca1f0e2db64cd9bf20 (patch) | |
tree | a024425be4723093299dc498b236b8c1a7c3d217 /BaseTools/Source/Python/Ecc | |
parent | 00755e1c8019cb073de85dea97737aedc10f352c (diff) | |
download | edk2-0006d3fd0f82b88e421594ca1f0e2db64cd9bf20.tar.gz edk2-0006d3fd0f82b88e421594ca1f0e2db64cd9bf20.tar.bz2 edk2-0006d3fd0f82b88e421594ca1f0e2db64cd9bf20.zip |
BaseTools: Remove EDK_SOURCE keyword from ECC Tool
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350
Remove EDK_SOURCE keyword from ECC 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>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Ecc')
-rw-r--r-- | BaseTools/Source/Python/Ecc/EccMain.py | 27 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py | 20 |
2 files changed, 0 insertions, 47 deletions
diff --git a/BaseTools/Source/Python/Ecc/EccMain.py b/BaseTools/Source/Python/Ecc/EccMain.py index 5f9e497e37..0f97447751 100644 --- a/BaseTools/Source/Python/Ecc/EccMain.py +++ b/BaseTools/Source/Python/Ecc/EccMain.py @@ -68,9 +68,6 @@ class Ecc(object): self.ParseOption()
EdkLogger.info(time.strftime("%H:%M:%S, %b.%d %Y ", time.localtime()) + "[00:00]" + "\n")
- #
- # Check EFI_SOURCE (Edk build convention). EDK_SOURCE will always point to ECP
- #
WorkspaceDir = os.path.normcase(os.path.normpath(os.environ["WORKSPACE"]))
os.environ["WORKSPACE"] = WorkspaceDir
@@ -78,33 +75,9 @@ class Ecc(object): PackagesPath = os.getenv("PACKAGES_PATH")
mws.setWs(WorkspaceDir, PackagesPath)
- if "ECP_SOURCE" not in os.environ:
- os.environ["ECP_SOURCE"] = mws.join(WorkspaceDir, GlobalData.gEdkCompatibilityPkg)
- if "EFI_SOURCE" not in os.environ:
- os.environ["EFI_SOURCE"] = os.environ["ECP_SOURCE"]
- if "EDK_SOURCE" not in os.environ:
- os.environ["EDK_SOURCE"] = os.environ["ECP_SOURCE"]
-
- #
- # Unify case of characters on case-insensitive systems
- #
- EfiSourceDir = os.path.normcase(os.path.normpath(os.environ["EFI_SOURCE"]))
- EdkSourceDir = os.path.normcase(os.path.normpath(os.environ["EDK_SOURCE"]))
- EcpSourceDir = os.path.normcase(os.path.normpath(os.environ["ECP_SOURCE"]))
-
- os.environ["EFI_SOURCE"] = EfiSourceDir
- os.environ["EDK_SOURCE"] = EdkSourceDir
- os.environ["ECP_SOURCE"] = EcpSourceDir
-
GlobalData.gWorkspace = WorkspaceDir
- GlobalData.gEfiSource = EfiSourceDir
- GlobalData.gEdkSource = EdkSourceDir
- GlobalData.gEcpSource = EcpSourceDir
GlobalData.gGlobalDefines["WORKSPACE"] = WorkspaceDir
- GlobalData.gGlobalDefines["EFI_SOURCE"] = EfiSourceDir
- GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir
- GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir
EdkLogger.info("Loading ECC configuration ... done")
# Generate checkpoints list
diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py index 283789fd1d..862974894a 100644 --- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py @@ -610,17 +610,6 @@ class InfParser(MetaFileParser): if not Value:
continue
- if Value.upper().find('$(EFI_SOURCE)\Edk'.upper()) > -1 or Value.upper().find('$(EFI_SOURCE)/Edk'.upper()) > -1:
- Value = '$(EDK_SOURCE)' + Value[17:]
- if Value.find('$(EFI_SOURCE)') > -1 or Value.find('$(EDK_SOURCE)') > -1:
- pass
- elif Value.startswith('.'):
- pass
- elif Value.startswith('$('):
- pass
- else:
- Value = '$(EFI_SOURCE)/' + Value
-
self._ValueList[Index] = ReplaceMacro(Value, Macros)
## Parse [Sources] section
@@ -1359,16 +1348,7 @@ class DscParser(MetaFileParser): # Allow using system environment variables in path after !include
#
__IncludeMacros['WORKSPACE'] = GlobalData.gGlobalDefines['WORKSPACE']
- if "ECP_SOURCE" in GlobalData.gGlobalDefines.keys():
- __IncludeMacros['ECP_SOURCE'] = GlobalData.gGlobalDefines['ECP_SOURCE']
- #
- # During GenFds phase call DSC parser, will go into this branch.
- #
- elif "ECP_SOURCE" in GlobalData.gCommandLineDefines.keys():
- __IncludeMacros['ECP_SOURCE'] = GlobalData.gCommandLineDefines['ECP_SOURCE']
- __IncludeMacros['EFI_SOURCE'] = GlobalData.gGlobalDefines['EFI_SOURCE']
- __IncludeMacros['EDK_SOURCE'] = GlobalData.gGlobalDefines['EDK_SOURCE']
#
# Allow using MACROs comes from [Defines] section to keep compatible.
#
|