зеркало из https://github.com/mozilla/gecko-dev.git
Bug 916257 - part 3 - write ALL_IPDLSRCS and CPPSRCS in one go; r=gps
This commit is contained in:
Родитель
88a3cb3162
Коммит
693a67cd38
|
@ -5,6 +5,7 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import errno
|
import errno
|
||||||
|
import itertools
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import types
|
import types
|
||||||
|
@ -289,8 +290,9 @@ class RecursiveMakeBackend(CommonBackend):
|
||||||
'ipc', 'ipdl', 'ipdlsrcs.mk'))
|
'ipc', 'ipdl', 'ipdlsrcs.mk'))
|
||||||
mk = mozmakeutil.Makefile()
|
mk = mozmakeutil.Makefile()
|
||||||
|
|
||||||
for p in sorted(self._ipdl_sources):
|
sorted_ipdl_sources = list(sorted(self._ipdl_sources))
|
||||||
mk.add_statement('ALL_IPDLSRCS += %s\n' % p)
|
mk.add_statement('ALL_IPDLSRCS := %s\n' % ' '.join(sorted_ipdl_sources))
|
||||||
|
|
||||||
def files_from(ipdl):
|
def files_from(ipdl):
|
||||||
base = os.path.basename(ipdl)
|
base = os.path.basename(ipdl)
|
||||||
root, ext = os.path.splitext(base)
|
root, ext = os.path.splitext(base)
|
||||||
|
@ -303,7 +305,8 @@ class RecursiveMakeBackend(CommonBackend):
|
||||||
'%sParent.cpp' % root])
|
'%sParent.cpp' % root])
|
||||||
return files
|
return files
|
||||||
|
|
||||||
mk.add_statement('CPPSRCS += %s\n' % ' '.join(files_from(p)))
|
ipdl_cppsrcs = itertools.chain(*[files_from(p) for p in sorted_ipdl_sources])
|
||||||
|
mk.add_statement('CPPSRCS := %s\n' % ' '.join(ipdl_cppsrcs))
|
||||||
|
|
||||||
mk.add_statement('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))))
|
for p in self._ipdl_sources))))
|
||||||
|
|
Загрузка…
Ссылка в новой задаче