diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py index 42b8ad541d8..c5ebae81be7 100644 --- a/python/mozbuild/mozbuild/backend/recursivemake.py +++ b/python/mozbuild/mozbuild/backend/recursivemake.py @@ -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)