Back to index

enigmail  1.4.3
Public Member Functions | Public Attributes
pymake.data.PatternRule Class Reference

List of all members.

Public Member Functions

def __init__
def addcommand
def ismatchany
def hasspecificmatch
def matchesfor
def prerequisitesforstem

Public Attributes

 targetpatterns
 prerequisites
 doublecolon
 loc
 commands

Detailed Description

An implicit rule or static pattern rule containing target patterns, prerequisite patterns,
and a list of commands.

Definition at line 1285 of file data.py.


Constructor & Destructor Documentation

def pymake.data.PatternRule.__init__ (   self,
  targetpatterns,
  prerequisites,
  doublecolon,
  loc 
)

Definition at line 1291 of file data.py.

01291 
01292     def __init__(self, targetpatterns, prerequisites, doublecolon, loc):
01293         self.targetpatterns = targetpatterns
01294         self.prerequisites = prerequisites
01295         self.doublecolon = doublecolon
01296         self.loc = loc
01297         self.commands = []


Member Function Documentation

def pymake.data.PatternRule.addcommand (   self,
  c 
)

Definition at line 1298 of file data.py.

01298 
01299     def addcommand(self, c):
01300         assert isinstance(c, (Expansion, StringExpansion))
01301         self.commands.append(c)

def pymake.data.PatternRule.hasspecificmatch (   self,
  file 
)

Definition at line 1305 of file data.py.

01305 
01306     def hasspecificmatch(self, file):
01307         for p in self.targetpatterns:
01308             if not p.ismatchany() and p.match(file) is not None:
01309                 return True
01310 
01311         return False

Definition at line 1302 of file data.py.

01302 
01303     def ismatchany(self):
01304         return util.any((t.ismatchany() for t in self.targetpatterns))

def pymake.data.PatternRule.matchesfor (   self,
  dir,
  file,
  skipsinglecolonmatchany 
)
Determine all the target patterns of this rule that might match target t.
@yields a PatternRuleInstance for each.

Definition at line 1312 of file data.py.

01312 
01313     def matchesfor(self, dir, file, skipsinglecolonmatchany):
01314         """
01315         Determine all the target patterns of this rule that might match target t.
01316         @yields a PatternRuleInstance for each.
01317         """
01318 
01319         for p in self.targetpatterns:
01320             matchany = p.ismatchany()
01321             if matchany:
01322                 if skipsinglecolonmatchany and not self.doublecolon:
01323                     continue
01324 
01325                 yield PatternRuleInstance(self, dir, file, True)
01326             else:
01327                 stem = p.match(dir + file)
01328                 if stem is not None:
01329                     yield PatternRuleInstance(self, '', stem, False)
01330                 else:
01331                     stem = p.match(file)
01332                     if stem is not None:
01333                         yield PatternRuleInstance(self, dir, stem, False)

def pymake.data.PatternRule.prerequisitesforstem (   self,
  dir,
  stem 
)

Definition at line 1334 of file data.py.

01334 
01335     def prerequisitesforstem(self, dir, stem):
01336         return [p.resolve(dir, stem) for p in self.prerequisites]


Member Data Documentation

Definition at line 1296 of file data.py.

Definition at line 1294 of file data.py.

Definition at line 1295 of file data.py.

Definition at line 1293 of file data.py.

Definition at line 1292 of file data.py.


The documentation for this class was generated from the following file: