mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 818246 - Part 6: Support XPIDL_MODULE in moz.build; r=gps
This commit is contained in:
parent
0d33ac5f93
commit
fc8734bd9f
@ -76,6 +76,8 @@ class TreeMetadataEmitter(object):
|
||||
passthru = VariablePassthru(sandbox)
|
||||
if sandbox['XPIDL_SOURCES']:
|
||||
passthru.variables['XPIDLSRCS'] = sandbox['XPIDL_SOURCES']
|
||||
if sandbox['XPIDL_MODULE']:
|
||||
passthru.variables['XPIDL_MODULE'] = sandbox['XPIDL_MODULE']
|
||||
|
||||
if passthru.variables:
|
||||
yield passthru
|
||||
|
@ -149,6 +149,14 @@ VARIABLES = {
|
||||
Entries must be files that exist. Entries are almost certainly .idl
|
||||
files.
|
||||
"""),
|
||||
|
||||
'XPIDL_MODULE': (unicode, "",
|
||||
"""XPCOM Interface Definition Module Name.
|
||||
|
||||
This is the name of the .xpt file that is created by linking
|
||||
XPIDL_SOURCES together. If unspecified, it defaults to be the same as
|
||||
MODULE.
|
||||
"""),
|
||||
}
|
||||
|
||||
# The set of functions exposed to the sandbox.
|
||||
|
@ -2,3 +2,4 @@
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
XPIDL_SOURCES = ['foo.idl', 'bar.idl', 'biz.idl']
|
||||
XPIDL_MODULE = 'module_name'
|
||||
|
@ -129,6 +129,7 @@ class TestRecursiveMakeBackend(BackendTester):
|
||||
'XPIDLSRCS += bar.idl',
|
||||
'XPIDLSRCS += biz.idl',
|
||||
])
|
||||
self.assertEqual(lines[5], 'XPIDL_MODULE := module_name')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -2,4 +2,4 @@
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
XPIDL_SOURCES += ['foo.idl', 'bar.idl', 'biz.idl']
|
||||
|
||||
XPIDL_MODULE = 'module_name'
|
||||
|
@ -121,10 +121,12 @@ class TestEmitterBasic(unittest.TestCase):
|
||||
self.assertIsInstance(objs[1], VariablePassthru)
|
||||
|
||||
variables = objs[1].variables
|
||||
self.assertEqual(len(variables), 1)
|
||||
self.assertEqual(len(variables), 2)
|
||||
self.assertIn('XPIDLSRCS', variables)
|
||||
self.assertEqual(variables['XPIDLSRCS'],
|
||||
['foo.idl', 'bar.idl', 'biz.idl'])
|
||||
self.assertIn('XPIDL_MODULE', variables)
|
||||
self.assertEqual(variables['XPIDL_MODULE'], 'module_name')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user