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=bob.c.feng@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 0FA3C211B63F0 for ; Tue, 15 Jan 2019 03:02:51 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2019 03:02:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,481,1539673200"; d="scan'208";a="291682034" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga005.jf.intel.com with ESMTP; 15 Jan 2019 03:02:50 -0800 From: "Feng, Bob C" To: edk2-devel@lists.01.org Cc: Bob Feng , Liming Gao Date: Tue, 15 Jan 2019 19:02:48 +0800 Message-Id: <20190115110248.15416-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.19.1.windows.1 MIME-Version: 1.0 Subject: [Patch] BaseTools: Remove EDK_SOURCE keyword from ECC Tool 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: Tue, 15 Jan 2019 11:02:52 -0000 Content-Transfer-Encoding: 8bit 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 Cc: Liming Gao --- BaseTools/Source/Python/Ecc/EccMain.py | 27 ------------------- .../Ecc/MetaFileWorkspace/MetaFileParser.py | 20 -------------- 2 files changed, 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 @@ -66,47 +66,20 @@ class Ecc(object): # Parse the options and args 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 # set multiple workspace 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 EccGlobalData.gConfig = Configuration(self.ConfigFile) 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 @@ -608,21 +608,10 @@ class InfParser(MetaFileParser): for Index in range(0, len(self._ValueList)): Value = self._ValueList[Index] 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 # # Only path can have macro used. So we need to replace them before use. @@ -1357,20 +1346,11 @@ class DscParser(MetaFileParser): __IncludeMacros = {} # # 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. # __IncludeMacros.update(self._Macros) -- 2.19.1.windows.1