]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Ecc/Ecc.py
BaseTools: Clean up source files
[mirror_edk2.git] / BaseTools / Source / Python / Ecc / Ecc.py
index e78d70372e36ce354be7b49f45de69d3410a5e8a..ccd563a4660e87f9da6b9a131c37f855b7134d4a 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to be the main entrance of ECC tool\r
 #\r
-# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -51,7 +51,7 @@ class Ecc(object):
         # Version and Copyright\r
         self.VersionNumber = ("1.0" + " Build " + gBUILD_VERSION)\r
         self.Version = "%prog Version " + self.VersionNumber\r
-        self.Copyright = "Copyright (c) 2009 - 2016, Intel Corporation  All rights reserved."\r
+        self.Copyright = "Copyright (c) 2009 - 2018, Intel Corporation  All rights reserved."\r
 \r
         self.InitDefaultConfigIni()\r
         self.OutputFile = 'output.txt'\r
@@ -66,17 +66,17 @@ class Ecc(object):
         # Parse the options and args\r
         self.ParseOption()\r
         EdkLogger.info(time.strftime("%H:%M:%S, %b.%d %Y ", time.localtime()) + "[00:00]" + "\n")\r
-        \r
+\r
         #\r
         # Check EFI_SOURCE (Edk build convention). EDK_SOURCE will always point to ECP\r
         #\r
         WorkspaceDir = os.path.normcase(os.path.normpath(os.environ["WORKSPACE"]))\r
         os.environ["WORKSPACE"] = WorkspaceDir\r
-        \r
+\r
         # set multiple workspace\r
         PackagesPath = os.getenv("PACKAGES_PATH")\r
         mws.setWs(WorkspaceDir, PackagesPath)\r
-        \r
+\r
         if "ECP_SOURCE" not in os.environ:\r
             os.environ["ECP_SOURCE"] = mws.join(WorkspaceDir, GlobalData.gEdkCompatibilityPkg)\r
         if "EFI_SOURCE" not in os.environ:\r
@@ -90,11 +90,11 @@ class Ecc(object):
         EfiSourceDir = os.path.normcase(os.path.normpath(os.environ["EFI_SOURCE"]))\r
         EdkSourceDir = os.path.normcase(os.path.normpath(os.environ["EDK_SOURCE"]))\r
         EcpSourceDir = os.path.normcase(os.path.normpath(os.environ["ECP_SOURCE"]))\r
-        \r
+\r
         os.environ["EFI_SOURCE"] = EfiSourceDir\r
         os.environ["EDK_SOURCE"] = EdkSourceDir\r
         os.environ["ECP_SOURCE"] = EcpSourceDir\r
-        \r
+\r
         GlobalData.gWorkspace = WorkspaceDir\r
         GlobalData.gEfiSource = EfiSourceDir\r
         GlobalData.gEdkSource = EdkSourceDir\r
@@ -104,7 +104,7 @@ class Ecc(object):
         GlobalData.gGlobalDefines["EFI_SOURCE"] = EfiSourceDir\r
         GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir\r
         GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir\r
-        \r
+\r
         EdkLogger.info("Loading ECC configuration ... done")\r
         # Generate checkpoints list\r
         EccGlobalData.gConfig = Configuration(self.ConfigFile)\r
@@ -120,11 +120,11 @@ class Ecc(object):
         # Get files real name in workspace dir\r
         #\r
         GlobalData.gAllFiles = DirCache(GlobalData.gWorkspace)\r
-         \r
+\r
         # Build ECC database\r
 #         self.BuildDatabase()\r
         self.DetectOnlyScanDirs()\r
-        \r
+\r
         # Start to check\r
         self.Check()\r
 \r
@@ -160,8 +160,8 @@ class Ecc(object):
                 EdkLogger.error("ECC", BuildToolError.OPTION_VALUE_INVALID, ExtraData="Use -f option need to fill specific folders in config.ini file")\r
         else:\r
             self.BuildDatabase()\r
-            \r
-    \r
+\r
+\r
     ## BuildDatabase\r
     #\r
     # Build the database for target\r
@@ -172,7 +172,7 @@ class Ecc(object):
         EccGlobalData.gDb.TblReport.Create()\r
 \r
         # Build database\r
-        if self.IsInit:            \r
+        if self.IsInit:\r
             if self.ScanMetaData:\r
                 EdkLogger.quiet("Building database for Meta Data File ...")\r
                 self.BuildMetaDataFileDatabase(SpeciDirs)\r
@@ -198,7 +198,7 @@ class Ecc(object):
         if SpecificDirs is None:\r
             ScanFolders.append(EccGlobalData.gTarget)\r
         else:\r
-            for specificDir in SpecificDirs:    \r
+            for specificDir in SpecificDirs:\r
                 ScanFolders.append(os.path.join(EccGlobalData.gTarget, specificDir))\r
         EdkLogger.quiet("Building database for meta data files ...")\r
         Op = open(EccGlobalData.gConfig.MetaDataFileCheckPathOfGenerateFileList, 'w+')\r
@@ -219,7 +219,7 @@ class Ecc(object):
                             # symlinks to directories are treated as directories\r
                             Dirs.remove(Dir)\r
                             Dirs.append(Dirname)\r
-    \r
+\r
                 for File in Files:\r
                     if len(File) > 4 and File[-4:].upper() == ".DEC":\r
                         Filename = os.path.normpath(os.path.join(Root, File))\r