зеркало из https://github.com/mozilla/gecko-dev.git
Bug 916257 - part 1 - convert ipdlsrcs.mk writing to use mozbuild.makeutil; r=gps
This commit is contained in:
Родитель
e1bac581d5
Коммит
ca8aa75ab6
|
@ -11,6 +11,7 @@ import types
|
|||
|
||||
from collections import namedtuple
|
||||
|
||||
import mozbuild.makeutil as mozmakeutil
|
||||
from mozpack.copier import FilePurger
|
||||
from mozpack.manifests import (
|
||||
InstallManifest,
|
||||
|
@ -554,21 +555,25 @@ class RecursiveMakeBackend(CommonBackend):
|
|||
# Write out a master list of all IPDL source files.
|
||||
ipdls = FileAvoidWrite(os.path.join(self.environment.topobjdir,
|
||||
'ipc', 'ipdl', 'ipdlsrcs.mk'))
|
||||
mk = mozmakeutil.Makefile()
|
||||
|
||||
for p in sorted(self._ipdl_sources):
|
||||
ipdls.write('ALL_IPDLSRCS += %s\n' % p)
|
||||
mk.add_statement('ALL_IPDLSRCS += %s\n' % p)
|
||||
base = os.path.basename(p)
|
||||
root, ext = os.path.splitext(base)
|
||||
|
||||
# Both .ipdl and .ipdlh become .cpp files
|
||||
ipdls.write('CPPSRCS += %s.cpp\n' % root)
|
||||
mk.add_statement('CPPSRCS += %s.cpp\n' % root)
|
||||
if ext == '.ipdl':
|
||||
# .ipdl also becomes Child/Parent.cpp files
|
||||
ipdls.write('CPPSRCS += %sChild.cpp\n' % root)
|
||||
ipdls.write('CPPSRCS += %sParent.cpp\n' % root)
|
||||
mk.add_statement('CPPSRCS += %sChild.cpp\n' % root)
|
||||
mk.add_statement('CPPSRCS += %sParent.cpp\n' % root)
|
||||
|
||||
ipdls.write('IPDLDIRS := %s\n' % ' '.join(sorted(set(os.path.dirname(p)
|
||||
mk.add_statement('IPDLDIRS := %s\n' % ' '.join(sorted(set(os.path.dirname(p)
|
||||
for p in self._ipdl_sources))))
|
||||
|
||||
mk.dump(ipdls)
|
||||
|
||||
self._update_from_avoid_write(ipdls.close())
|
||||
self.summary.managed_count += 1
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче