diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py index edc1fb7e6d6..f6327fede92 100644 --- a/python/mozbuild/mozbuild/frontend/emitter.py +++ b/python/mozbuild/mozbuild/frontend/emitter.py @@ -84,6 +84,7 @@ class TreeMetadataEmitter(object): CPPSRCS='CPP_SOURCES', CSRCS='CSRCS', DEFINES='DEFINES', + EXTRA_COMPONENTS='EXTRA_COMPONENTS', MODULE='MODULE', SIMPLE_PROGRAMS='SIMPLE_PROGRAMS', XPIDL_FLAGS='XPIDL_FLAGS', diff --git a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py index b44885ef757..83bd2b09ed7 100644 --- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py +++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py @@ -98,6 +98,12 @@ VARIABLES = { delimiters. """), + 'EXTRA_COMPONENTS': (StrictOrderingOnAppendList, list, [], + """Additional component files to distribute. + + This variable contains a list of files to copy into $(FINAL_TARGET)/components/. + """), + 'PARALLEL_DIRS': (list, list, [], """A parallel version of DIRS. 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 faea12197e4..073ff786886 100644 --- a/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build +++ b/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build @@ -10,6 +10,7 @@ ASFILES = ['bar.s', 'foo.asm'] DEFINES = ['-Dbar', '-Dfoo'] +EXTRA_COMPONENTS = ['bar.js', 'foo.js'] SIMPLE_PROGRAMS = ['bar.x', 'foo.x'] diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py index 0de26d4e6f5..376e831e132 100644 --- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py +++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py @@ -154,6 +154,10 @@ class TestRecursiveMakeBackend(BackendTester): 'DEFINES += -Dbar', 'DEFINES += -Dfoo', ], + 'EXTRA_COMPONENTS': [ + 'EXTRA_COMPONENTS += bar.js', + 'EXTRA_COMPONENTS += foo.js', + ], 'SIMPLE_PROGRAMS': [ 'SIMPLE_PROGRAMS += bar.x', 'SIMPLE_PROGRAMS += foo.x', 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 920612e07d5..59e0ceb3adc 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build @@ -10,6 +10,8 @@ ASFILES += ['fans.asm', 'tans.s'] DEFINES=['-Dfans', '-Dtans'] +EXTRA_COMPONENTS=['fans.js', 'tans.js'] + SIMPLE_PROGRAMS += ['fans.x', 'tans.x'] CSRCS += ['fans.c', 'tans.c'] diff --git a/python/mozbuild/mozbuild/test/frontend/test_emitter.py b/python/mozbuild/mozbuild/test/frontend/test_emitter.py index 67b42db24a3..1b66c4555c4 100644 --- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py +++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py @@ -129,6 +129,7 @@ class TestEmitterBasic(unittest.TestCase): CMMSRCS=['fans.mm', 'tans.mm'], CSRCS=['fans.c', 'tans.c'], DEFINES=['-Dfans', '-Dtans'], + EXTRA_COMPONENTS=['fans.js', 'tans.js'], SIMPLE_PROGRAMS=['fans.x', 'tans.x'], XPIDLSRCS=['bar.idl', 'biz.idl', 'foo.idl'], XPIDL_MODULE='module_name',