Fixed common dependency file calculation error
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 17 Apr 2008 06:39:35 +0000 (06:39 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 17 Apr 2008 06:39:35 +0000 (06:39 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1158 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/AutoGen/GenMake.py

index 11ea673..f96c2c5 100755 (executable)
@@ -1181,11 +1181,13 @@ class Makefile(object):
         # Extract comman files list in the dependency files\r
         #\r
         self.CommonFileDependency = list(DepSet)\r
-        for F in self.FileDependency:\r
-            NewDepSet = set(self.FileDependency[F])\r
+        for File in self.FileDependency:\r
+            # skip non-C files\r
+            if (not File.endswith(".c") and not File.endswith(".C")) or File.endswith("AutoGen.c"):\r
+                continue\r
+            NewDepSet = set(self.FileDependency[File])\r
             NewDepSet -= DepSet\r
-            if File.endswith(".c") or File.endswith(".C") or not File.endswith("AutoGen.c"):\r
-                self.FileDependency[F] = ["$(COMMON_DEPS)"] + list(NewDepSet)\r
+            self.FileDependency[File] = ["$(COMMON_DEPS)"] + list(NewDepSet)\r
 \r
         for File, TargetTemplate in self.FileBuildTargetList:\r
             if File not in self.FileDependency:\r