Bug 1241022 - Handle all tiers as opt-in in the recursive make backend. r=gps

Historically, all tiers were handled as opt-out (may_skip), until we
added the first opt-in tier (no_skip). It doesn't make much sense to
differentiate them anymore, so handle them all as opt-in.
This commit is contained in:
Mike Hommey 2016-01-20 11:49:07 +09:00
parent 675c03a3d8
commit 41545b65f1

View File

@ -409,11 +409,9 @@ class RecursiveMakeBackend(CommonBackend):
self._traversal = RecursiveMakeTraversal()
self._compile_graph = defaultdict(set)
self._may_skip = {
self._no_skip = {
'export': set(),
'libs': set(),
}
self._no_skip = {
'misc': set(),
'tools': set(),
}
@ -626,18 +624,12 @@ class RecursiveMakeBackend(CommonBackend):
convenience variables, and the other dependency definitions for a
hopefully proper directory traversal.
"""
for tier, skip in self._may_skip.items():
self.log(logging.DEBUG, 'fill_root_mk', {
'number': len(skip), 'tier': tier
}, 'Ignoring {number} directories during {tier}')
for tier, no_skip in self._no_skip.items():
self.log(logging.DEBUG, 'fill_root_mk', {
'number': len(no_skip), 'tier': tier
}, 'Using {number} directories during {tier}')
def should_skip(tier, dir):
if tier in self._may_skip:
return dir in self._may_skip[tier]
if tier in self._no_skip:
return dir not in self._no_skip[tier]
return False
@ -792,10 +784,13 @@ class RecursiveMakeBackend(CommonBackend):
{'path': makefile}, 'Substituting makefile: {path}')
self._makefile_in_count += 1
for tier, skiplist in self._may_skip.items():
# topobjdir is an exception, it's still skipped.
if bf.relobjdir and bf.relobjdir in skiplist:
skiplist.remove(bf.relobjdir)
# In the export and libs tiers, we don't skip directories
# containing a Makefile.in.
# topobjdir is handled separatedly, don't do anything for
# it.
if bf.relobjdir:
for tier in ('export', 'libs',):
self._no_skip[tier].add(bf.relobjdir)
else:
self.log(logging.DEBUG, 'stub_makefile',
{'path': makefile}, 'Creating stub Makefile: {path}')
@ -922,9 +917,6 @@ class RecursiveMakeBackend(CommonBackend):
affected_tiers = set(obj.affected_tiers)
for tier in set(self._may_skip.keys()) - affected_tiers:
self._may_skip[tier].add(backend_file.relobjdir)
for tier in set(self._no_skip.keys()) & affected_tiers:
self._no_skip[tier].add(backend_file.relobjdir)