]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: fix an incremental build issue.
authorFeng, Bob C <bob.c.feng@intel.com>
Wed, 28 Aug 2019 07:33:45 +0000 (15:33 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Thu, 29 Aug 2019 03:07:48 +0000 (11:07 +0800)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2137

This patch is going to fix a regression issue of incremental
build which was introduced by the commit 94459080c.
The changing on INF file will not trigger module rebuild.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/AutoGen/ModuleAutoGen.py

index 2cd0d3859e181ec736fb5e696c7723ea17151983..f610365f6dee5c3f248c8cf18afe982b8626c3b2 100755 (executable)
@@ -1766,12 +1766,8 @@ class ModuleAutoGen(AutoGen):
 \r
             if os.path.exists (self.TimeStampPath):\r
                 os.remove (self.TimeStampPath)\r
-            with tempfile.NamedTemporaryFile('w+', dir=os.path.dirname(self.TimeStampPath), delete=False) as tf:\r
-                for f in FileSet:\r
-                    tf.write(f)\r
-                    tf.write("\n")\r
-                tempname = tf.name\r
-            SaveFileOnChange(self.TimeStampPath, tempname, False)\r
+\r
+            SaveFileOnChange(self.TimeStampPath, "\n".join(FileSet), False)\r
 \r
         # Ignore generating makefile when it is a binary module\r
         if self.IsBinaryModule:\r