Added extra files in build_rule.txt to source file's dependency
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 5 Jun 2008 07:17:51 +0000 (07:17 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 5 Jun 2008 07:17:51 +0000 (07:17 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1250 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/AutoGen/GenMake.py

index 282659d..c2d5317 100755 (executable)
@@ -556,6 +556,7 @@ cleanlib:
 \r
         ForceIncludedFile = []\r
         SourceFileList = []\r
+        ExtraDenpendencies = {}\r
 \r
         if "CC" not in self.PlatformInfo.ToolChainFamily:\r
             EdkLogger.error("AutoGen", AUTOGEN_ERROR, "No CC tool found",\r
@@ -589,6 +590,7 @@ cleanlib:
                 self.SourceFileDatabase[SrcFileType] = []\r
             self.SourceFileDatabase[SrcFileType].append(SrcFile)\r
             SourceFileList.append(SrcFileRelativePath)\r
+            ExtraDenpendencies[SrcFileRelativePath] = ExtraSrcFileList\r
 \r
             BuildTargetTemplate = "${BEGIN}%s : ${deps}\n"\\r
                                   "${END}\t%s\n" % (DstFile, "\n\t".join(CommandList))\r
@@ -696,6 +698,7 @@ cleanlib:
                     self.SourceFileDatabase[SrcFileType] = []\r
                 self.SourceFileDatabase[SrcFileType].append(SrcFile)\r
                 SourceFileList.append(SrcFileRelativePath)\r
+                ExtraDenpendencies[SrcFileRelativePath] = ExtraSrcFileList\r
 \r
                 BuildTargetTemplate = "${BEGIN}%s : ${deps}\n"\\r
                                       "${END}\t%s\n" % (DstFile, "\n\t".join(CommandList))\r
@@ -734,6 +737,8 @@ cleanlib:
         self.FileDependency = self.GetFileDependency(SourceFileList, ForceIncludedFile, self._AutoGenObject.IncludePathList)\r
         DepSet = None\r
         for File in self.FileDependency:\r
+            if File in ExtraDenpendencies:\r
+                self.FileDependency[File] += ExtraDenpendencies[File]\r
             # skip non-C files\r
             if (not File.endswith(".c") and not File.endswith(".C")) or File.endswith("AutoGen.c"):\r
                 continue\r