Bug 907789 - part 2 - use mozbuild.makeutil to write webidl file lists; r=gps

This commit is contained in:
Nathan Froyd 2013-09-13 20:21:05 -04:00
parent 8f7b83cf94
commit 980030dae4

View File

@ -588,9 +588,11 @@ class RecursiveMakeBackend(CommonBackend):
webidls = FileAvoidWrite(os.path.join(self.environment.topobjdir,
'dom', 'bindings', 'webidlsrcs.mk'))
mk = mozmakeutil.Makefile()
def write_var(variable, sources):
files = [os.path.basename(f) for f in sorted(sources)]
webidls.write('%s += %s\n' % (variable, ' '.join(files)))
mk.add_statement('%s += %s\n' % (variable, ' '.join(files)))
write_var('webidl_files', self._webidl_sources)
write_var('generated_events_webidl_files', self._generated_events_webidl_sources)
write_var('test_webidl_files', self._test_webidl_sources)
@ -598,6 +600,8 @@ class RecursiveMakeBackend(CommonBackend):
write_var('generated_webidl_files', self._generated_webidl_sources)
write_var('preprocessed_webidl_files', self._preprocessed_webidl_sources)
mk.dump(webidls)
self._update_from_avoid_write(webidls.close())
self.summary.managed_count += 1