Bug 875934 - Part 1: Move LIBRARY_NAME from Makefile.in to moz.build - moz.build support. r=ted

This commit is contained in:
Brian O'Keefe 2013-05-24 10:49:12 -04:00
parent a68a7de6da
commit b36947dfb0
6 changed files with 19 additions and 0 deletions

View File

@ -87,6 +87,7 @@ class TreeMetadataEmitter(object):
EXTRA_COMPONENTS='EXTRA_COMPONENTS',
HOST_CSRCS='HOST_CSRCS',
HOST_LIBRARY_NAME='HOST_LIBRARY_NAME',
LIBRARY_NAME='LIBRARY_NAME',
MODULE='MODULE',
SIMPLE_PROGRAMS='SIMPLE_PROGRAMS',
SSRCS='SSRCS',

View File

@ -123,6 +123,16 @@ VARIABLES = {
"""Name of target library generated when cross compiling.
"""),
'LIBRARY_NAME': (unicode, unicode, "",
"""The name of the library generated for a directory.
Example:
In example/components/moz.build,
LIBRARY_NAME = 'xpcomsample'
would generate example/components/libxpcomsample.so on Linux, or
example/components/xpcomsample.lib on Windows.
"""),
'SIMPLE_PROGRAMS': (StrictOrderingOnAppendList, list, [],
"""Generate a list of binaries from source.

View File

@ -16,6 +16,8 @@ HOST_CSRCS = ['bar.c', 'foo.c']
HOST_LIBRARY_NAME = 'host_bar'
LIBRARY_NAME = 'lib_name'
SIMPLE_PROGRAMS = ['bar.x', 'foo.x']
CSRCS += ['bar.c', 'foo.c']

View File

@ -165,6 +165,9 @@ class TestRecursiveMakeBackend(BackendTester):
'HOST_LIBRARY_NAME': [
'HOST_LIBRARY_NAME := host_bar',
],
'LIBRARY_NAME': [
'LIBRARY_NAME := lib_name',
],
'SIMPLE_PROGRAMS': [
'SIMPLE_PROGRAMS += bar.x',
'SIMPLE_PROGRAMS += foo.x',

View File

@ -16,6 +16,8 @@ HOST_CSRCS += ['fans.c', 'tans.c']
HOST_LIBRARY_NAME = 'host_fans'
LIBRARY_NAME = 'lib_name'
SIMPLE_PROGRAMS += ['fans.x', 'tans.x']
CSRCS += ['fans.c', 'tans.c']

View File

@ -132,6 +132,7 @@ class TestEmitterBasic(unittest.TestCase):
EXTRA_COMPONENTS=['fans.js', 'tans.js'],
HOST_CSRCS=['fans.c', 'tans.c'],
HOST_LIBRARY_NAME='host_fans',
LIBRARY_NAME='lib_name',
SIMPLE_PROGRAMS=['fans.x', 'tans.x'],
SSRCS=['fans.S', 'tans.S'],
XPIDLSRCS=['bar.idl', 'biz.idl', 'foo.idl'],