]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
BaseTools: Clean up source files
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / GenFdsGlobalVariable.py
index 6eb1201cee49ee0f9ab0f72702802092c0ef7c0c..eeb3ec2197a8f9f468f848851f02fa7ab65f62d4 100644 (file)
@@ -65,7 +65,7 @@ class GenFdsGlobalVariable:
     FdfFileTimeStamp = 0\r
     FixedLoadAddress = False\r
     PlatformName = ''\r
     FdfFileTimeStamp = 0\r
     FixedLoadAddress = False\r
     PlatformName = ''\r
-    \r
+\r
     BuildRuleFamily = "MSFT"\r
     ToolChainFamily = "MSFT"\r
     __BuildRuleDatabase = None\r
     BuildRuleFamily = "MSFT"\r
     ToolChainFamily = "MSFT"\r
     __BuildRuleDatabase = None\r
@@ -75,7 +75,7 @@ class GenFdsGlobalVariable:
     CopyList   = []\r
     ModuleFile = ''\r
     EnableGenfdsMultiThread = False\r
     CopyList   = []\r
     ModuleFile = ''\r
     EnableGenfdsMultiThread = False\r
-    \r
+\r
     #\r
     # The list whose element are flags to indicate if large FFS or SECTION files exist in FV.\r
     # At the beginning of each generation of FV, false flag is appended to the list,\r
     #\r
     # The list whose element are flags to indicate if large FFS or SECTION files exist in FV.\r
     # At the beginning of each generation of FV, false flag is appended to the list,\r
@@ -90,7 +90,7 @@ class GenFdsGlobalVariable:
     LARGE_FILE_SIZE = 0x1000000\r
 \r
     SectionHeader = struct.Struct("3B 1B")\r
     LARGE_FILE_SIZE = 0x1000000\r
 \r
     SectionHeader = struct.Struct("3B 1B")\r
-    \r
+\r
     ## LoadBuildRule\r
     #\r
     @staticmethod\r
     ## LoadBuildRule\r
     #\r
     @staticmethod\r
@@ -117,7 +117,7 @@ class GenFdsGlobalVariable:
                    and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY] \\r
                    and ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag]:\r
                     GenFdsGlobalVariable.BuildRuleFamily = ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag]\r
                    and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY] \\r
                    and ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag]:\r
                     GenFdsGlobalVariable.BuildRuleFamily = ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag]\r
-                    \r
+\r
                 if DataType.TAB_TOD_DEFINES_FAMILY in ToolDefinition \\r
                    and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY] \\r
                    and ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY][GenFdsGlobalVariable.ToolChainTag]:\r
                 if DataType.TAB_TOD_DEFINES_FAMILY in ToolDefinition \\r
                    and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY] \\r
                    and ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY][GenFdsGlobalVariable.ToolChainTag]:\r
@@ -229,11 +229,11 @@ class GenFdsGlobalVariable:
             while Index < len(SourceList):\r
                 Source = SourceList[Index]\r
                 Index = Index + 1\r
             while Index < len(SourceList):\r
                 Source = SourceList[Index]\r
                 Index = Index + 1\r
-    \r
+\r
                 if File.IsBinary and File == Source and Inf.Binaries is not None and File in Inf.Binaries:\r
                     # Skip all files that are not binary libraries\r
                     if not Inf.LibraryClass:\r
                 if File.IsBinary and File == Source and Inf.Binaries is not None and File in Inf.Binaries:\r
                     # Skip all files that are not binary libraries\r
                     if not Inf.LibraryClass:\r
-                        continue            \r
+                        continue\r
                     RuleObject = BuildRules[DataType.TAB_DEFAULT_BINARY_FILE]\r
                 elif FileType in BuildRules:\r
                     RuleObject = BuildRules[FileType]\r
                     RuleObject = BuildRules[DataType.TAB_DEFAULT_BINARY_FILE]\r
                 elif FileType in BuildRules:\r
                     RuleObject = BuildRules[FileType]\r
@@ -244,15 +244,15 @@ class GenFdsGlobalVariable:
                     if LastTarget:\r
                         TargetList.add(str(LastTarget))\r
                     break\r
                     if LastTarget:\r
                         TargetList.add(str(LastTarget))\r
                     break\r
-    \r
+\r
                 FileType = RuleObject.SourceFileType\r
                 FileType = RuleObject.SourceFileType\r
-    \r
+\r
                 # stop at STATIC_LIBRARY for library\r
                 if Inf.LibraryClass and FileType == DataType.TAB_STATIC_LIBRARY:\r
                     if LastTarget:\r
                         TargetList.add(str(LastTarget))\r
                     break\r
                 # stop at STATIC_LIBRARY for library\r
                 if Inf.LibraryClass and FileType == DataType.TAB_STATIC_LIBRARY:\r
                     if LastTarget:\r
                         TargetList.add(str(LastTarget))\r
                     break\r
-    \r
+\r
                 Target = RuleObject.Apply(Source)\r
                 if not Target:\r
                     if LastTarget:\r
                 Target = RuleObject.Apply(Source)\r
                 if not Target:\r
                     if LastTarget:\r
@@ -261,11 +261,11 @@ class GenFdsGlobalVariable:
                 elif not Target.Outputs:\r
                     # Only do build for target with outputs\r
                     TargetList.add(str(Target))\r
                 elif not Target.Outputs:\r
                     # Only do build for target with outputs\r
                     TargetList.add(str(Target))\r
-    \r
+\r
                 # to avoid cyclic rule\r
                 if FileType in RuleChain:\r
                     break\r
                 # to avoid cyclic rule\r
                 if FileType in RuleChain:\r
                     break\r
-    \r
+\r
                 RuleChain.append(FileType)\r
                 SourceList.extend(Target.Outputs)\r
                 LastTarget = Target\r
                 RuleChain.append(FileType)\r
                 SourceList.extend(Target.Outputs)\r
                 LastTarget = Target\r
@@ -645,19 +645,19 @@ class GenFdsGlobalVariable:
     @staticmethod\r
     def GenerateOptionRom(Output, EfiInput, BinaryInput, Compress=False, ClassCode=None,\r
                         Revision=None, DeviceId=None, VendorId=None, IsMakefile=False):\r
     @staticmethod\r
     def GenerateOptionRom(Output, EfiInput, BinaryInput, Compress=False, ClassCode=None,\r
                         Revision=None, DeviceId=None, VendorId=None, IsMakefile=False):\r
-        InputList = []   \r
+        InputList = []\r
         Cmd = ["EfiRom"]\r
         if len(EfiInput) > 0:\r
         Cmd = ["EfiRom"]\r
         if len(EfiInput) > 0:\r
-            \r
+\r
             if Compress:\r
                 Cmd.append("-ec")\r
             else:\r
                 Cmd.append("-e")\r
             if Compress:\r
                 Cmd.append("-ec")\r
             else:\r
                 Cmd.append("-e")\r
-                \r
+\r
             for EfiFile in EfiInput:\r
                 Cmd.append(EfiFile)\r
                 InputList.append (EfiFile)\r
             for EfiFile in EfiInput:\r
                 Cmd.append(EfiFile)\r
                 InputList.append (EfiFile)\r
-        \r
+\r
         if len(BinaryInput) > 0:\r
             Cmd.append("-b")\r
             for BinFile in BinaryInput:\r
         if len(BinaryInput) > 0:\r
             Cmd.append("-b")\r
             for BinFile in BinaryInput:\r
@@ -668,7 +668,7 @@ class GenFdsGlobalVariable:
         if not GenFdsGlobalVariable.NeedsUpdate(Output, InputList) and not IsMakefile:\r
             return\r
         GenFdsGlobalVariable.DebugLogger(EdkLogger.DEBUG_5, "%s needs update because of newer %s" % (Output, InputList))\r
         if not GenFdsGlobalVariable.NeedsUpdate(Output, InputList) and not IsMakefile:\r
             return\r
         GenFdsGlobalVariable.DebugLogger(EdkLogger.DEBUG_5, "%s needs update because of newer %s" % (Output, InputList))\r
-                        \r
+\r
         if ClassCode is not None:\r
             Cmd += ("-l", ClassCode)\r
         if Revision is not None:\r
         if ClassCode is not None:\r
             Cmd += ("-l", ClassCode)\r
         if Revision is not None:\r
@@ -811,7 +811,7 @@ class GenFdsGlobalVariable:
                         EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern)\r
                     if PcdObj.DatumType != DataType.TAB_VOID:\r
                         EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern)\r
                         EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern)\r
                     if PcdObj.DatumType != DataType.TAB_VOID:\r
                         EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern)\r
-                        \r
+\r
                     PcdValue = PcdObj.DefaultValue\r
                     return PcdValue\r
 \r
                     PcdValue = PcdObj.DefaultValue\r
                     return PcdValue\r
 \r
@@ -827,7 +827,7 @@ class GenFdsGlobalVariable:
                             EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern)\r
                         if PcdObj.DatumType != DataType.TAB_VOID:\r
                             EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern)\r
                             EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern)\r
                         if PcdObj.DatumType != DataType.TAB_VOID:\r
                             EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern)\r
-                            \r
+\r
                         PcdValue = PcdObj.DefaultValue\r
                         return PcdValue\r
 \r
                         PcdValue = PcdObj.DefaultValue\r
                         return PcdValue\r
 \r