Disabled all cached data because of inconsistency risk
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 17 Apr 2008 01:44:38 +0000 (01:44 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 17 Apr 2008 01:44:38 +0000 (01:44 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1156 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/build/build.py

index 1d920cb..3276714 100644 (file)
@@ -80,7 +80,7 @@ def IsToolInPath(tool):
 def CheckEnvVariable():\r
     # check WORKSPACE\r
     if "WORKSPACE" not in os.environ:\r
-        EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found", \r
+        EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",\r
                         ExtraData="WORKSPACE")\r
 \r
     WorkspaceDir = os.path.normpath(os.environ["WORKSPACE"])\r
@@ -90,7 +90,7 @@ def CheckEnvVariable():
 \r
     #\r
     # Check EFI_SOURCE (R8 build convention). EDK_SOURCE will always point to ECP\r
-    # \r
+    #\r
     os.environ["EDK_SOURCE"] = os.path.join(WorkspaceDir, GlobalData.gEdkCompatibilityPkg)\r
     if "EFI_SOURCE" not in os.environ:\r
         os.environ["EFI_SOURCE"] = os.environ["EDK_SOURCE"]\r
@@ -104,22 +104,22 @@ def CheckEnvVariable():
 \r
     # change absolute path to relative path to WORKSPACE\r
     if EfiSourceDir.upper().find(WorkspaceDir.upper()) != 0:\r
-        EdkLogger.error("build", PARAMETER_INVALID, "EFI_SOURCE is not under WORKSPACE", \r
+        EdkLogger.error("build", PARAMETER_INVALID, "EFI_SOURCE is not under WORKSPACE",\r
                         ExtraData="WORKSPACE = %s\n    EFI_SOURCE = %s" % (WorkspaceDir, EfiSourceDir))\r
     if EdkSourceDir.upper().find(WorkspaceDir.upper()) != 0:\r
-        EdkLogger.error("build", PARAMETER_INVALID, "EDK_SOURCE is not under WORKSPACE", \r
+        EdkLogger.error("build", PARAMETER_INVALID, "EDK_SOURCE is not under WORKSPACE",\r
                         ExtraData="WORKSPACE = %s\n    EDK_SOURCE = %s" % (WorkspaceDir, EdkSourceDir))\r
     EfiSourceDir = EfiSourceDir[len(WorkspaceDir)+1:]\r
     EdkSourceDir = EdkSourceDir[len(WorkspaceDir)+1:]\r
 \r
     # check EDK_TOOLS_PATH\r
     if "EDK_TOOLS_PATH" not in os.environ:\r
-        EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found", \r
+        EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",\r
                         ExtraData="EDK_TOOLS_PATH")\r
 \r
     # check PATH\r
     if "PATH" not in os.environ:\r
-        EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found", \r
+        EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Environment variable not found",\r
                         ExtraData="PATH")\r
 \r
     PathString = os.environ["PATH"]\r
@@ -628,8 +628,8 @@ class Build():
     #   @param  SpawnMode           Indicate multi-thread build mode\r
     #   @param  ThreadNumber        The maximum number of thread if in multi-thread build mode\r
     #\r
-    def __init__(self, Target, WorkspaceDir, Platform, Module, Arch, ToolChain, \r
-                 BuildTarget, FlashDefinition, FdList=[], FvList=[], \r
+    def __init__(self, Target, WorkspaceDir, Platform, Module, Arch, ToolChain,\r
+                 BuildTarget, FlashDefinition, FdList=[], FvList=[],\r
                  MakefileType="nmake", SpawnMode=False, ThreadNumber=2,\r
                  SkipAutoGen=False, Reparse=False, SkuId=None):\r
 \r
@@ -659,7 +659,7 @@ class Build():
 \r
         # parse target.txt, tools_def.txt, and platform file\r
         #self.Progress.Start("Loading build configuration")\r
-        self.RestoreBuildData()\r
+        #self.RestoreBuildData()\r
         self.LoadConfiguration()\r
         #self.Progress.Stop("done!")\r
 \r
@@ -785,7 +785,7 @@ class Build():
                 FileList = glob.glob(os.path.normpath(os.path.join(WorkingDirectory, '*.dsc')))\r
                 FileNum = len(FileList)\r
                 if FileNum >= 2:\r
-                    EdkLogger.error("build", OPTION_MISSING, \r
+                    EdkLogger.error("build", OPTION_MISSING,\r
                                     ExtraData="There are %d DSC files in %s. Use '-p' to specify one.\n" % (FileNum, WorkingDirectory))\r
                 elif FileNum == 1:\r
                     self.PlatformFile = NormFile(FileList[0], self.WorkspaceDir)\r
@@ -893,7 +893,7 @@ class Build():
             return False\r
 \r
         # skip file generation for cleanxxx targets and run target\r
-        if Target not in ['clean', 'cleanlib', 'cleanall', 'run']:    \r
+        if Target not in ['clean', 'cleanlib', 'cleanall', 'run']:\r
             # for target which must generate AutoGen code and makefile\r
             if not self.SkipAutoGen or Target == 'genc':\r
                 self.Progress.Start("Generating code")\r
@@ -901,7 +901,7 @@ class Build():
                 self.Progress.Stop("done!")\r
             if Target == "genc":\r
                 return True\r
-    \r
+\r
             if not self.SkipAutoGen or Target == 'genmake':\r
                 self.Progress.Start("Generating makefile")\r
                 AutoGenResult.CreateMakeFile(CreateDepModuleMakeFile)\r
@@ -1020,7 +1020,7 @@ class Build():
                                     'FV'\r
                                     )\r
                         if not os.path.exists(FvDir):\r
-                            continue \r
+                            continue\r
                         # Build up the list of supported architectures for this build\r
                         prefix = '%s_%s_%s_' % (BuildTarget, ToolChain, Arch)\r
 \r
@@ -1079,7 +1079,7 @@ class Build():
 \r
     ## Do some clean-up works when error occurred\r
     def Relinquish(self):\r
-        self.DumpBuildData()\r
+        #self.DumpBuildData()\r
         Utils.Progressor.Abort()\r
         if self.SpawnMode == True:\r
             BuildTask.Abort()\r
@@ -1096,7 +1096,7 @@ class Build():
             Utils.gFileTimeStampCache = Utils.DataRestore(FilePath)\r
             if Utils.gFileTimeStampCache == None:\r
                 Utils.gFileTimeStampCache = {}\r
-        \r
+\r
         FilePath = os.path.join(self.WorkspaceDir, gBuildCacheDir, "gDependencyDatabase")\r
         if Utils.gDependencyDatabase == {} and os.path.isfile(FilePath):\r
             Utils.gDependencyDatabase = Utils.DataRestore(FilePath)\r
@@ -1216,11 +1216,11 @@ def Main():
                             ExtraData="Please select one of: %s" %(' '.join(gSupportedTarget)))\r
         else:\r
             Target = Target[0].lower()\r
-    \r
+\r
         if Target not in gSupportedTarget:\r
             EdkLogger.error("build", OPTION_NOT_SUPPORTED, "Not supported target [%s]." % Target,\r
                             ExtraData="Please select one of: %s" %(' '.join(gSupportedTarget)))\r
-    \r
+\r
         # GlobalData.gGlobalDefines = ParseDefines(Option.Defines)\r
         #\r
         # Check environment variable: EDK_TOOLS_PATH, WORKSPACE, PATH\r
@@ -1245,13 +1245,13 @@ def Main():
         if Option.FdfFile != None:\r
             Option.FdfFile = NormFile(Option.FdfFile, Workspace)\r
 \r
-        MyBuild = Build(Target, Workspace, Option.PlatformFile, Option.ModuleFile, \r
-                        Option.TargetArch, Option.ToolChain, Option.BuildTarget, \r
-                        Option.FdfFile, Option.RomImage, Option.FvImage, \r
-                        Option.MakefileType, Option.SpawnMode, Option.ThreadNumber, \r
+        MyBuild = Build(Target, Workspace, Option.PlatformFile, Option.ModuleFile,\r
+                        Option.TargetArch, Option.ToolChain, Option.BuildTarget,\r
+                        Option.FdfFile, Option.RomImage, Option.FvImage,\r
+                        Option.MakefileType, Option.SpawnMode, Option.ThreadNumber,\r
                         Option.SkipAutoGen, Option.Reparse, Option.SkuId)\r
         MyBuild.Launch()\r
-        MyBuild.DumpBuildData()\r
+        #MyBuild.DumpBuildData()\r
     except BaseException, X:\r
         EdkLogger.SetLevel(EdkLogger.QUIET)\r
         if MyBuild != None:\r