Back to index

enigmail  1.4.3
Public Member Functions | Public Attributes | Static Private Attributes
pymake.parserdata.Rule Class Reference
Inheritance diagram for pymake.parserdata.Rule:
Inheritance graph
[legend]
Collaboration diagram for pymake.parserdata.Rule:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def execute
def dump

Public Attributes

 targetexp
 depexp
 doublecolon

Static Private Attributes

tuple __slots__ = ('targetexp', 'depexp', 'doublecolon')

Detailed Description

Definition at line 113 of file parserdata.py.


Constructor & Destructor Documentation

def pymake.parserdata.Rule.__init__ (   self,
  targetexp,
  depexp,
  doublecolon 
)

Definition at line 116 of file parserdata.py.

00116 
00117     def __init__(self, targetexp, depexp, doublecolon):
00118         assert isinstance(targetexp, (data.Expansion, data.StringExpansion))
00119         assert isinstance(depexp, (data.Expansion, data.StringExpansion))
00120         
00121         self.targetexp = targetexp
00122         self.depexp = depexp
00123         self.doublecolon = doublecolon


Member Function Documentation

def pymake.parserdata.Rule.dump (   self,
  fd,
  indent 
)

Definition at line 153 of file parserdata.py.

00153 
00154     def dump(self, fd, indent):
00155         print >>fd, "%sRule %s: %s" % (indent, self.targetexp, self.depexp)

Here is the caller graph for this function:

def pymake.parserdata.Rule.execute (   self,
  makefile,
  context 
)

Definition at line 124 of file parserdata.py.

00124 
00125     def execute(self, makefile, context):
00126         atargets = data.stripdotslashes(self.targetexp.resolvesplit(makefile, makefile.variables))
00127         targets = [data.Pattern(p) for p in _expandwildcards(makefile, atargets)]
00128 
00129         if not len(targets):
00130             context.currule = DummyRule()
00131             return
00132 
00133         ispatterns = set((t.ispattern() for t in targets))
00134         if len(ispatterns) == 2:
00135             raise data.DataError("Mixed implicit and normal rule", self.targetexp.loc)
00136         ispattern, = ispatterns
00137 
00138         if ispattern and context.weak:
00139             raise data.DataError("Pattern rules not allowed in includedeps", self.targetexp.loc)
00140 
00141         deps = [p for p in _expandwildcards(makefile, data.stripdotslashes(self.depexp.resolvesplit(makefile, makefile.variables)))]
00142         if ispattern:
00143             rule = data.PatternRule(targets, map(data.Pattern, deps), self.doublecolon, loc=self.targetexp.loc)
00144             makefile.appendimplicitrule(rule)
00145         else:
00146             rule = data.Rule(deps, self.doublecolon, loc=self.targetexp.loc, weakdeps=context.weak)
00147             for t in targets:
00148                 makefile.gettarget(t.gettarget()).addrule(rule)
00149 
00150             makefile.foundtarget(targets[0].gettarget())
00151 
00152         context.currule = rule

Here is the call graph for this function:


Member Data Documentation

tuple pymake.parserdata.Rule.__slots__ = ('targetexp', 'depexp', 'doublecolon') [static, private]

Definition at line 114 of file parserdata.py.

Definition at line 121 of file parserdata.py.

Definition at line 122 of file parserdata.py.

Definition at line 120 of file parserdata.py.


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