Back to index

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

List of all members.

Public Member Functions

def __init__
def setup
def resolve
def __getitem__
def append
def __len__

Public Attributes

 loc
 vname
 substfrom
 substto
 maxargs

Static Private Attributes

tuple __slots__ = ('loc', 'vname', 'substfrom', 'substto')

Detailed Description

$(VARNAME:.c=.o) and $(VARNAME:%.c=%.o)

Definition at line 73 of file functions.py.


Constructor & Destructor Documentation

def pymake.functions.SubstitutionRef.__init__ (   self,
  loc,
  varname,
  substfrom,
  substto 
)

Definition at line 78 of file functions.py.

00078 
00079     def __init__(self, loc, varname, substfrom, substto):
00080         self.loc = loc
00081         self.vname = varname
00082         self.substfrom = substfrom
00083         self.substto = substto


Member Function Documentation

def pymake.functions.Function.__getitem__ (   self,
  key 
) [inherited]

Definition at line 32 of file functions.py.

00032 
00033     def __getitem__(self, key):
00034         return self._arguments[key]

def pymake.functions.Function.__len__ (   self) [inherited]

Definition at line 47 of file functions.py.

00047 
00048     def __len__(self):
00049         return len(self._arguments)

def pymake.functions.Function.append (   self,
  arg 
) [inherited]

Definition at line 43 of file functions.py.

00043 
00044     def append(self, arg):
00045         assert isinstance(arg, (data.Expansion, data.StringExpansion))
00046         self._arguments.append(arg)

Here is the caller graph for this function:

def pymake.functions.SubstitutionRef.resolve (   self,
  makefile,
  variables,
  fd,
  setting 
)

Definition at line 87 of file functions.py.

00087 
00088     def resolve(self, makefile, variables, fd, setting):
00089         vname = self.vname.resolvestr(makefile, variables, setting)
00090         if vname in setting:
00091             raise data.DataError("Setting variable '%s' recursively references itself." % (vname,), self.loc)
00092 
00093         substfrom = self.substfrom.resolvestr(makefile, variables, setting)
00094         substto = self.substto.resolvestr(makefile, variables, setting)
00095 
00096         flavor, source, value = variables.get(vname)
00097         if value is None:
00098             log.debug("%s: variable '%s' was not set" % (self.loc, vname))
00099             return
00100 
00101         f = data.Pattern(substfrom)
00102         if not f.ispattern():
00103             f = data.Pattern('%' + substfrom)
00104             substto = '%' + substto
00105 
00106         fd.write(' '.join([f.subst(substto, word, False)
00107                            for word in value.resolvesplit(makefile, variables, setting + [vname])]))

Here is the caller graph for this function:

Reimplemented from pymake.functions.Function.

Definition at line 84 of file functions.py.

00084 
00085     def setup(self):
00086         assert False, "Shouldn't get here"


Member Data Documentation

tuple pymake.functions.SubstitutionRef.__slots__ = ('loc', 'vname', 'substfrom', 'substto') [static, private]

Reimplemented from pymake.functions.Function.

Definition at line 76 of file functions.py.

Reimplemented from pymake.functions.Function.

Definition at line 79 of file functions.py.

Definition at line 81 of file functions.py.

Definition at line 82 of file functions.py.

Definition at line 80 of file functions.py.


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