]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenMake.py
BaseTools: Fix an incremental build issue caused by macro in #include
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenMake.py
index 97ba158ff271090d69baa0682a3f21d36e925747..59a01a7f243ac0a1644ecee0d58eb42df4c6dbb6 100755 (executable)
@@ -1080,13 +1080,17 @@ cleanlib:
                     else:\r
                         CmdCppDict[item.Target.SubDir] = ['$(MAKE_FILE)', Path]\r
                     if CppPath.Path in DependencyDict:\r
-                        for Temp in DependencyDict[CppPath.Path]:\r
-                            try:\r
-                                Path = self.PlaceMacro(Temp.Path, self.Macros)\r
-                            except:\r
-                                continue\r
-                            if Path not in (self.CommonFileDependency + CmdCppDict[item.Target.SubDir]):\r
-                                CmdCppDict[item.Target.SubDir].append(Path)\r
+                        if '$(FORCE_REBUILD)' in DependencyDict[CppPath.Path]:\r
+                            if '$(FORCE_REBUILD)' not in (self.CommonFileDependency + CmdCppDict[item.Target.SubDir]):\r
+                                CmdCppDict[item.Target.SubDir].append('$(FORCE_REBUILD)')\r
+                        else:\r
+                            for Temp in DependencyDict[CppPath.Path]:\r
+                                try:\r
+                                    Path = self.PlaceMacro(Temp.Path, self.Macros)\r
+                                except:\r
+                                    continue\r
+                                if Path not in (self.CommonFileDependency + CmdCppDict[item.Target.SubDir]):\r
+                                    CmdCppDict[item.Target.SubDir].append(Path)\r
         if T.Commands:\r
             CommandList = T.Commands[:]\r
             for Item in CommandList[:]:\r