From bfff7a989dd6b60a27ccca2b86ee80617684dda7 Mon Sep 17 00:00:00 2001 From: Joey Armstrong Date: Wed, 5 Jun 2013 14:34:56 -0400 Subject: [PATCH] bug 870407: move CMMSRCS to moz.build (logic). r=ted --- python/mozbuild/mozbuild/frontend/emitter.py | 1 + python/mozbuild/mozbuild/frontend/sandbox_symbols.py | 6 ++++++ .../mozbuild/test/backend/data/variable_passthru/moz.build | 2 ++ python/mozbuild/mozbuild/test/backend/test_recursivemake.py | 4 ++++ .../mozbuild/test/frontend/data/variable-passthru/moz.build | 2 ++ python/mozbuild/mozbuild/test/frontend/test_emitter.py | 1 + 6 files changed, 16 insertions(+) diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py index adbed85b58b5..edc1fb7e6d67 100644 --- a/python/mozbuild/mozbuild/frontend/emitter.py +++ b/python/mozbuild/mozbuild/frontend/emitter.py @@ -80,6 +80,7 @@ class TreeMetadataEmitter(object): varmap = dict( # Makefile.in : moz.build ASFILES='ASFILES', + CMMSRCS='CMMSRCS', CPPSRCS='CPP_SOURCES', CSRCS='CSRCS', DEFINES='DEFINES', diff --git a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py index c303490ad6c9..b44885ef7571 100644 --- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py +++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py @@ -66,6 +66,12 @@ VARIABLES = { This variable contains a list of files to invoke the assembler on. """), + 'CMMSRCS': (StrictOrderingOnAppendList, list, [], + """Sources to compile with the Objective C/C++ compiler. + + This variable contains a list of objective-C++ sources to compile. + """), + 'CSRCS': (StrictOrderingOnAppendList, list, [], """C code source files. diff --git a/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build b/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build index 0d5be204b1de..faea12197e4f 100644 --- a/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build +++ b/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build @@ -14,3 +14,5 @@ DEFINES = ['-Dbar', '-Dfoo'] SIMPLE_PROGRAMS = ['bar.x', 'foo.x'] CSRCS += ['bar.c', 'foo.c'] + +CMMSRCS = ['bar.mm', 'foo.mm'] diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py index 59906957222f..0de26d4e6f54 100644 --- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py +++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py @@ -142,6 +142,10 @@ class TestRecursiveMakeBackend(BackendTester): 'ASFILES += bar.s', 'ASFILES += foo.asm', ], + 'CMMSRCS': [ + 'CMMSRCS += bar.mm', + 'CMMSRCS += foo.mm', + ], 'CSRCS': [ 'CSRCS += bar.c', 'CSRCS += foo.c', diff --git a/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build b/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build index f1055de23217..920612e07d58 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build @@ -13,3 +13,5 @@ DEFINES=['-Dfans', '-Dtans'] SIMPLE_PROGRAMS += ['fans.x', 'tans.x'] CSRCS += ['fans.c', 'tans.c'] + +CMMSRCS = ['fans.mm', 'tans.mm'] diff --git a/python/mozbuild/mozbuild/test/frontend/test_emitter.py b/python/mozbuild/mozbuild/test/frontend/test_emitter.py index c5a04d077a23..67b42db24a33 100644 --- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py +++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py @@ -126,6 +126,7 @@ class TestEmitterBasic(unittest.TestCase): wanted = dict( ASFILES=['fans.asm', 'tans.s'], + CMMSRCS=['fans.mm', 'tans.mm'], CSRCS=['fans.c', 'tans.c'], DEFINES=['-Dfans', '-Dtans'], SIMPLE_PROGRAMS=['fans.x', 'tans.x'],