|
@@ -59,7 +59,7 @@ diff --git a/config/config.mk b/config/config.mk
|
|
|
GLOBAL_DEPS += backend.mk
|
|
|
include backend.mk
|
|
|
endif
|
|
|
-@@ -417,19 +420,16 @@ endif # ! WINNT
|
|
|
+@@ -429,19 +432,16 @@ endif # ! WINNT
|
|
|
|
|
|
# Make sure any compiled classes work with at least JVM 1.4
|
|
|
JAVAC_FLAGS += -source 1.4
|
|
@@ -123,7 +123,7 @@ diff --git a/python/mozbuild/mozbuild/action/file_generate.py b/python/mozbuild/
|
|
|
diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
|
|
|
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
|
|
|
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
|
|
|
-@@ -538,16 +538,20 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+@@ -528,16 +528,20 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
try:
|
|
|
outputs.append(o.format(**substs))
|
|
|
except KeyError as e:
|
|
@@ -140,11 +140,11 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
if obj.inputs:
|
|
|
if obj.localized:
|
|
|
# Localized generated files can have locale-specific inputs, which are
|
|
|
- # indicated by paths starting with `en-US/` or containing `/locales/en-US/`.
|
|
|
+ # indicated by paths starting with `en-US/` or containing `locales/en-US/`.
|
|
|
def srcpath(p):
|
|
|
- if '/locales/en-US' in p:
|
|
|
- e, f = p.split('/locales/en-US/', 1)
|
|
|
-@@ -577,28 +581,30 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
+ if 'locales/en-US' in p:
|
|
|
+ # We need an "absolute source path" relative to
|
|
|
+@@ -572,28 +576,30 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
# If we're doing this during export that means we need it during
|
|
|
# compile, but if we have an artifact build we don't run compile,
|
|
|
# so we can skip it altogether or let the rule run as the result of
|
|
@@ -184,10 +184,10 @@ diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild
|
|
|
diff --git a/python/mozbuild/mozbuild/backend/tup.py b/python/mozbuild/mozbuild/backend/tup.py
|
|
|
--- a/python/mozbuild/mozbuild/backend/tup.py
|
|
|
+++ b/python/mozbuild/mozbuild/backend/tup.py
|
|
|
-@@ -593,16 +593,17 @@ class TupBackend(CommonBackend):
|
|
|
+@@ -276,16 +276,17 @@ class TupOnly(CommonBackend, PartialBack
|
|
|
+ if obj.script and obj.method and obj.relobjdir not in skip_directories:
|
|
|
+ backend_file.export_shell()
|
|
|
cmd = self._py_action('file_generate')
|
|
|
- if obj.localized:
|
|
|
- cmd.append('--locale=en-US')
|
|
|
cmd.extend([
|
|
|
obj.script,
|
|
|
obj.method,
|
|
@@ -312,7 +312,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
|
|
|
]
|
|
|
|
|
|
self.maxDiff = None
|
|
|
-@@ -469,58 +484,80 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
+@@ -469,64 +484,86 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
def test_localized_generated_files_force(self):
|
|
|
"""Ensure LOCALIZED_GENERATED_FILES with .force is handled properly."""
|
|
|
env = self._consume('localized-generated-files-force', RecursiveMakeBackend)
|
|
@@ -345,7 +345,7 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
|
|
|
'$(REPORT_BUILD)',
|
|
|
- '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main abc.xyz $(MDDEPDIR)/abc.xyz.pp $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
|
|
|
+ '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main abc.xyz $(MDDEPDIR)/abc.xyz.pp $(MDDEPDIR)/abc.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
|
|
|
-+ '@$(TOUCH) $@',
|
|
|
+++ '@$(TOUCH) $@',
|
|
|
'',
|
|
|
]
|
|
|
|
|
@@ -379,13 +379,19 @@ diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/pytho
|
|
|
'GARBAGE += bar$(AB_rCD).xyz',
|
|
|
+ 'GARBAGE += $(MDDEPDIR)/bar$(AB_rCD).xyz.stub'
|
|
|
'EXTRA_MDDEPEND_FILES += bar$(AB_rCD).xyz.pp',
|
|
|
-- 'bar$(AB_rCD).xyz: %s/generate-foo.py $(call MERGE_RELATIVE_FILE,localized-input,/locales/inner) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
|
|
|
+- 'bar$(AB_rCD).xyz: %s/generate-foo.py $(call MERGE_RELATIVE_FILE,localized-input,inner/locales) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
|
|
|
+ '$(MDDEPDIR)/bar$(AB_rCD).xyz.stub: %s/generate-foo.py $(call MERGE_RELATIVE_FILE,localized-input,inner/locales) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
|
|
|
'$(REPORT_BUILD)',
|
|
|
-- '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main bar$(AB_rCD).xyz $(MDDEPDIR)/bar$(AB_rCD).xyz.pp $(call MERGE_RELATIVE_FILE,localized-input,/locales/inner) $(srcdir)/non-localized-input)' % env.topsrcdir,
|
|
|
+- '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main bar$(AB_rCD).xyz $(MDDEPDIR)/bar$(AB_rCD).xyz.pp $(call MERGE_RELATIVE_FILE,localized-input,inner/locales) $(srcdir)/non-localized-input)' % env.topsrcdir,
|
|
|
+ '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main bar$(AB_rCD).xyz $(MDDEPDIR)/bar$(AB_rCD).xyz.pp $(MDDEPDIR)/bar$(AB_rCD).xyz.stub $(call MERGE_RELATIVE_FILE,localized-input,inner/locales) $(srcdir)/non-localized-input)' % env.topsrcdir,
|
|
|
+ '@$(TOUCH) $@',
|
|
|
'',
|
|
|
+ 'GARBAGE += zot$(AB_rCD).xyz',
|
|
|
+ 'EXTRA_MDDEPEND_FILES += zot$(AB_rCD).xyz.pp',
|
|
|
+ 'zot$(AB_rCD).xyz: %s/generate-foo.py $(call MERGE_RELATIVE_FILE,localized-input,locales) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
|
|
|
+ '$(REPORT_BUILD)',
|
|
|
+ '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main zot$(AB_rCD).xyz $(MDDEPDIR)/zot$(AB_rCD).xyz.pp $(call MERGE_RELATIVE_FILE,localized-input,locales) $(srcdir)/non-localized-input)' % env.topsrcdir,
|
|
|
+ '',
|
|
|
+ 'zot$(AB_rCD).xyz: $(MDDEPDIR)/zot$(AB_rCD).xyz.stub ;',
|
|
|
+ 'GARBAGE += zot$(AB_rCD).xyz',
|
|
|
+ 'GARBAGE += $(MDDEPDIR)/zot$(AB_rCD).xyz.stub',
|