return "%s_LIST" % FileListMacro(FileType)\r
\r
class TargetDescBlock(object):\r
- _Cache_ = {} # {TargetFile : TargetDescBlock object}\r
-\r
- # Factory method\r
- def __new__(Class, Inputs, Outputs, Commands, Dependencies):\r
- if Outputs[0] in Class._Cache_:\r
- Tdb = Class._Cache_[Outputs[0]]\r
- for File in Inputs:\r
- Tdb.AddInput(File)\r
- else:\r
- Tdb = super(TargetDescBlock, Class).__new__(Class)\r
- Tdb._Init(Inputs, Outputs, Commands, Dependencies)\r
- #Class._Cache_[Outputs[0]] = Tdb\r
- return Tdb\r
+ def __init__(self, Inputs, Outputs, Commands, Dependencies):\r
+ self.InitWorker(Inputs, Outputs, Commands, Dependencies)\r
\r
- def _Init(self, Inputs, Outputs, Commands, Dependencies):\r
+ def InitWorker(self, Inputs, Outputs, Commands, Dependencies):\r
self.Inputs = Inputs\r
self.Outputs = Outputs\r
self.Commands = Commands\r
def IsMultipleInput(self):\r
return len(self.Inputs) > 1\r
\r
- @staticmethod\r
- def Renew():\r
- TargetDescBlock._Cache_ = {}\r
-\r
## Class for one build rule\r
#\r
# This represents a build rule which can give out corresponding command list for\r
# Command line should be regenerated since some macros are different\r
#\r
CommandList = self._BuildCommand(BuildRulePlaceholderDict)\r
- TargetDesc._Init([SourceFile], DstFile, CommandList, self.ExtraSourceFileList)\r
+ TargetDesc.InitWorker([SourceFile], DstFile, CommandList, self.ExtraSourceFileList)\r
break\r
else:\r
TargetDesc.AddInput(SourceFile)\r