bug 874266: move DEFINES to moz.build (logic), r=gps

This commit is contained in:
Joey Armstrong 2013-05-23 14:30:58 -07:00
parent 56ae085714
commit a92ff3abb3
6 changed files with 18 additions and 1 deletions

View File

@ -81,6 +81,7 @@ class TreeMetadataEmitter(object):
# Makefile.in : moz.build
ASFILES='ASFILES',
CSRCS='CSRCS',
DEFINES='DEFINES',
MODULE='MODULE',
SIMPLE_PROGRAMS='SIMPLE_PROGRAMS',
XPIDL_FLAGS='XPIDL_FLAGS',

View File

@ -72,6 +72,12 @@ VARIABLES = {
This variable contains a list of C source files to compile.
"""),
'DEFINES': (StrictOrderingOnAppendList, list, [],
"""Compiler defines to declare.
Command line -D flags passed to the compiler.
"""),
'DIRS': (list, list, [],
"""Child directories to descend into looking for build frontend files.

View File

@ -8,6 +8,9 @@ XPIDL_FLAGS = ['-Idir1', '-Idir2', '-Idir3']
ASFILES = ['bar.s', 'foo.asm']
DEFINES = ['-Dbar', '-Dfoo']
SIMPLE_PROGRAMS = ['bar.x', 'foo.x']
CSRCS += ['bar.c', 'foo.c']

View File

@ -146,6 +146,10 @@ class TestRecursiveMakeBackend(BackendTester):
'CSRCS += bar.c',
'CSRCS += foo.c',
],
'DEFINES': [
'DEFINES += -Dbar',
'DEFINES += -Dfoo',
],
'SIMPLE_PROGRAMS': [
'SIMPLE_PROGRAMS += bar.x',
'SIMPLE_PROGRAMS += foo.x',

View File

@ -8,6 +8,8 @@ XPIDL_FLAGS += ['-Idir1', '-Idir2', '-Idir3']
ASFILES += ['fans.asm', 'tans.s']
DEFINES=['-Dfans', '-Dtans']
SIMPLE_PROGRAMS += ['fans.x', 'tans.x']
CSRCS += ['fans.c', 'tans.c']

View File

@ -126,8 +126,9 @@ class TestEmitterBasic(unittest.TestCase):
wanted = dict(
ASFILES=['fans.asm', 'tans.s'],
SIMPLE_PROGRAMS=['fans.x', 'tans.x'],
CSRCS=['fans.c', 'tans.c'],
DEFINES=['-Dfans', '-Dtans'],
SIMPLE_PROGRAMS=['fans.x', 'tans.x'],
XPIDLSRCS=['bar.idl', 'biz.idl', 'foo.idl'],
XPIDL_MODULE='module_name',
XPIDL_FLAGS=['-Idir1', '-Idir2', '-Idir3'],