mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
Bug 1207882 - Associate an install target with every ContextDerived object. r=gps
Since reading context['FINAL_TARGET'] can have side effects, use it lazily.
This commit is contained in:
parent
a756617866
commit
75bdaecdfd
@ -88,6 +88,12 @@ class ContextDerived(TreeMetadata):
|
||||
|
||||
self.config = context.config
|
||||
|
||||
self._context = context
|
||||
|
||||
@property
|
||||
def install_target(self):
|
||||
return self._context['FINAL_TARGET']
|
||||
|
||||
@property
|
||||
def relobjdir(self):
|
||||
return mozpath.relpath(self.objdir, self.topobjdir)
|
||||
@ -163,7 +169,6 @@ class XPIDLFile(ContextDerived):
|
||||
__slots__ = (
|
||||
'add_to_manifest',
|
||||
'basename',
|
||||
'install_target',
|
||||
'source_path',
|
||||
)
|
||||
|
||||
@ -175,8 +180,6 @@ class XPIDLFile(ContextDerived):
|
||||
self.module = module
|
||||
self.add_to_manifest = add_to_manifest
|
||||
|
||||
self.install_target = context['FINAL_TARGET']
|
||||
|
||||
class BaseDefines(ContextDerived):
|
||||
"""Context derived container object for DEFINES/HOST_DEFINES,
|
||||
which are OrderedDicts.
|
||||
|
Loading…
Reference in New Issue
Block a user