Skip to content

Commit

Permalink
Bug 1462489 - Re-generate the build backend when a build backend outp…
Browse files Browse the repository at this point in the history
…ut is missing. r=mshal

MozReview-Commit-ID: CDO3bTGB4tj

--HG--
extra : rebase_source : 9bf580435d78a5048d05f7a37d8eff76b16f6ac9
  • Loading branch information
chmanchester committed May 30, 2018
1 parent 508b393 commit dbbf582
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions python/mozbuild/mozbuild/controller/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,19 @@ def build_out_of_date(output, dep_file):
return False

def backend_out_of_date(backend_file):
if not os.path.isfile(backend_file):
return True

# Check if any of our output files have been removed since
# we last built the backend, re-generate the backend if
# so.
outputs = []
with open(backend_file, 'r') as fh:
outputs = fh.read().splitlines()
for output in outputs:
if not os.path.isfile(mozpath.join(self.topobjdir, output)):
return True

dep_file = '%s.in' % backend_file
return build_out_of_date(backend_file, dep_file)

Expand Down

0 comments on commit dbbf582

Please sign in to comment.