]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/build.py
Maintainers.txt: Change maintainer for Intel*Pkg.
[mirror_edk2.git] / BaseTools / Source / Python / build / build.py
index cfd28a4b5b91bd455497d6487908a6a0eddc24f4..4d05ee27612d22bec11d24c1ef1749c3617d1d18 100644 (file)
@@ -890,7 +890,7 @@ class Build():
         for Tool in self.ToolChainList:\r
             if TAB_TOD_DEFINES_FAMILY not in ToolDefinition or Tool not in ToolDefinition[TAB_TOD_DEFINES_FAMILY] \\r
                or not ToolDefinition[TAB_TOD_DEFINES_FAMILY][Tool]:\r
-                EdkLogger.warn("No tool chain family found in configuration for %s. Default to MSFT." % Tool)\r
+                EdkLogger.warn("build", "No tool chain family found in configuration for %s. Default to MSFT." % Tool)\r
                 ToolChainFamily.append("MSFT")\r
             else:\r
                 ToolChainFamily.append(ToolDefinition[TAB_TOD_DEFINES_FAMILY][Tool])\r
@@ -1029,6 +1029,11 @@ class Build():
         if self.Prebuild:\r
             EdkLogger.info("\n- Prebuild Start -\n")\r
             self.LaunchPrebuildFlag = True\r
+            #\r
+            # The purpose of .PrebuildEnv file is capture environment variable settings set by the prebuild script\r
+            # and preserve them for the rest of the main build step, because the child process environment will\r
+            # evaporate as soon as it exits, we cannot get it in build step.\r
+            #\r
             PrebuildEnvFile = os.path.join(GlobalData.gConfDirectory,'.cache','.PrebuildEnv')\r
             if os.path.isfile(PrebuildEnvFile):\r
                 os.remove(PrebuildEnvFile)\r
@@ -1036,7 +1041,7 @@ class Build():
                 os.remove(self.PlatformBuildPath)\r
             if sys.platform == "win32":\r
                 args = ' && '.join((self.Prebuild, 'set > ' + PrebuildEnvFile))\r
-                Process = Popen(args, stdout=PIPE, stderr=PIPE)\r
+                Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True)\r
             else:\r
                 args = ' && '.join((self.Prebuild, 'env > ' + PrebuildEnvFile))\r
                 Process = Popen(args, stdout=PIPE, stderr=PIPE, shell=True)\r
@@ -1079,7 +1084,7 @@ class Build():
         if self.Postbuild:\r
             EdkLogger.info("\n- Postbuild Start -\n")\r
             if sys.platform == "win32":\r
-                Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE)\r
+                Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, shell=True)\r
             else:\r
                 Process = Popen(self.Postbuild, stdout=PIPE, stderr=PIPE, shell=True)\r
             # launch two threads to read the STDOUT and STDERR\r