a) Fixed single module hang issue when using spawn mode
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 11 Oct 2007 14:51:28 +0000 (14:51 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 11 Oct 2007 14:51:28 +0000 (14:51 +0000)
b) Fixed FD generation failure issue when in multi-thread mode
c) Added code to check if MAKE command is defined or not

git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@817 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/AutoGen/AutoGen.py
Source/Python/AutoGen/GenMake.py
Source/Python/build/build.py

index 9e39eed..360ed4e 100755 (executable)
@@ -258,6 +258,8 @@ class PlatformAutoGen:
                 if "MAKE" in self.BuildInfo[A].ToolOption:\r
                     CommandString = CommandString + " " + self.BuildInfo[A].ToolOption["MAKE"]\r
                 break\r
+        if CommandString == "":\r
+            EdkLogger.error("AutoGen", OPTION_MISSING, "No MAKE command defined. Please check your tools_def.txt!")\r
         return CommandString\r
 \r
     ## Parse build_rule.txt in $(WORKSPACE)/Conf/build_rule.txt\r
index 3981f6c..c4663ca 100755 (executable)
@@ -616,6 +616,9 @@ class Makefile(object):
         PlatformInfo = self.PlatformInfo.values()[0]\r
         ActivePlatform = PlatformInfo.Platform\r
 \r
+        if "MAKE" not in PlatformInfo.ToolPath:\r
+            EdkLogger.error("GenMake", OPTION_MISSING, "No MAKE command defined. Please check your tools_def.txt!")\r
+\r
         OutputDir = PlatformInfo.OutputDir\r
         if os.path.isabs(OutputDir):\r
             self.PlatformBuildDirectory = OutputDir\r
index 03814b7..d9ed593 100644 (file)
@@ -406,8 +406,9 @@ class BuildTask:
     ## Abort the build\r
     @staticmethod\r
     def Abort():\r
-        BuildTask._ErrorFlag.set()\r
-        BuildTask._CompleteFlag.wait()\r
+        if not BuildTask._CompleteFlag.isSet():\r
+            BuildTask._ErrorFlag.set()\r
+            BuildTask._CompleteFlag.wait()\r
 \r
     ## Check if there's error in running thread\r
     #\r
@@ -917,7 +918,7 @@ class Build():
 \r
                 # Generate FD image if there's a FDF file found\r
                 if self.Fdf != '' and self.Target in ["", "all", "fds"]:\r
-                    self.LaunchBuildCommand(Pa.GetBuildCommand() + " fds", Pa.GetMakeFileDir())\r
+                    LaunchCommand(Pa.GetBuildCommand() + " fds", Pa.GetMakeFileDir())\r
 \r
     ## Launch the module or platform build\r
     #\r
@@ -930,8 +931,9 @@ class Build():
                 else:\r
                     self._MultiThreadBuildPlatform()\r
             else:\r
+                self.SpawnMode = False\r
                 self._BuildModule()\r
-        except BaseException, X:\r
+        except:\r
             self.Progress.Stop("")\r
             raise\r
 \r