]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/build.py
This patch is going to:
[mirror_edk2.git] / BaseTools / Source / Python / build / build.py
index 56dbc5b39b354ec333202a51146fb99203aff6f8..74491f6ee7eab5f2005c6f78ec48d3d3b7fb3547 100644 (file)
@@ -245,6 +245,14 @@ def LaunchCommand(Command, WorkingDir):
     # if working directory doesn't exist, Popen() will raise an exception\r
     if not os.path.isdir(WorkingDir):\r
         EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=WorkingDir)\r
+    \r
+    # Command is used as the first Argument in following Popen().\r
+    # It could be a string or sequence. We find that if command is a string in following Popen(),\r
+    # ubuntu may fail with an error message that the command is not found.\r
+    # So here we may need convert command from string to list instance.\r
+    if not isinstance(Command, list):\r
+        if platform.system() != 'Windows':\r
+            Command = Command.split()\r
 \r
     Proc = None\r
     EndOfProcedure = None\r
@@ -921,7 +929,6 @@ class Build():
         if BuildModule:\r
             BuildCommand = BuildCommand + [Target]\r
             LaunchCommand(BuildCommand, AutoGenObject.MakeFileDir)\r
-            self.CreateAsBuiltInf()\r
             return True\r
 \r
         # build library\r
@@ -939,7 +946,6 @@ class Build():
             for Mod in AutoGenObject.ModuleBuildDirectoryList:\r
                 NewBuildCommand = BuildCommand + ['-f', os.path.normpath(os.path.join(Mod, makefile)), 'pbuild']\r
                 LaunchCommand(NewBuildCommand, AutoGenObject.MakeFileDir)\r
-            self.CreateAsBuiltInf()\r
             return True\r
 \r
         # cleanlib\r
@@ -1049,7 +1055,6 @@ class Build():
         BuildCommand = BuildCommand + [Target]\r
         if BuildModule:\r
             LaunchCommand(BuildCommand, AutoGenObject.MakeFileDir)\r
-            self.CreateAsBuiltInf()\r
             return True\r
 \r
         # build library\r
@@ -1402,12 +1407,6 @@ class Build():
                 for Arch in Wa.ArchList:\r
                     GlobalData.gGlobalDefines['ARCH'] = Arch\r
                     Pa = PlatformAutoGen(Wa, self.PlatformFile, BuildTarget, ToolChain, Arch)\r
-                    for Module in Pa.Platform.Modules:\r
-                        # Get ModuleAutoGen object to generate C code file and makefile\r
-                        Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)\r
-                        if Ma == None:\r
-                            continue\r
-                        self.BuildModules.append(Ma)\r
                     self._BuildPa(self.Target, Pa)\r
 \r
                 # Create MAP file when Load Fix Address is enabled.\r
@@ -1491,7 +1490,6 @@ class Build():
                     Ma = ModuleAutoGen(Wa, self.ModuleFile, BuildTarget, ToolChain, Arch, self.PlatformFile)\r
                     if Ma == None: continue\r
                     MaList.append(Ma)\r
-                    self.BuildModules.append(Ma)\r
                     if not Ma.IsBinaryModule:\r
                         self._Build(self.Target, Ma, BuildModule=True)\r
 \r