mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 916257 - part 1 - convert ipdlsrcs.mk writing to use mozbuild.makeutil; r=gps
This commit is contained in:
parent
394572324b
commit
945cb692e9
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user