Bug 1233282 - Make CONFIGURE_DEFINE_FILES considered more as GENERATED_FILES in the emitter. r=gps

From the backend perspective, CONFIGURE_DEFINE_FILES is the same as
GENERATED_FILES because in both cases a GeneratedFile object is emitted, but
from the perspective of some checks in the emitter, they aren't the same,
and that causes errors when adding a CONFIGURE_DEFINE_FILES to e.g. EXPORTS.
This commit is contained in:
Mike Hommey 2015-12-17 14:03:44 +09:00
Родитель a3e3b0838f
Коммит abf55a5284
1 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -547,12 +547,6 @@ class TreeMetadataEmitter(LoggingMixin):
yield self._create_substitution(ConfigFileSubstitution, context, yield self._create_substitution(ConfigFileSubstitution, context,
path) path)
for path in context['CONFIGURE_DEFINE_FILES']:
script = mozpath.join(mozpath.dirname(mozpath.dirname(__file__)),
'action', 'process_define_files.py')
yield GeneratedFile(context, script, 'process_define_file', path,
[mozpath.join(context.srcdir, path + '.in')])
for obj in self._process_xpidl(context): for obj in self._process_xpidl(context):
yield obj yield obj
@ -689,7 +683,7 @@ class TreeMetadataEmitter(LoggingMixin):
if mozpath.basename(f.full_path) not in generated_files: if mozpath.basename(f.full_path) not in generated_files:
raise SandboxValidationError( raise SandboxValidationError(
('Objdir file listed in %s not in ' + ('Objdir file listed in %s not in ' +
'GENERATED_FILES: %s') % (var, path), context) 'GENERATED_FILES: %s') % (var, f), context)
# Addons (when XPI_NAME is defined) and Applications (when # Addons (when XPI_NAME is defined) and Applications (when
# DIST_SUBDIR is defined) use a different preferences directory # DIST_SUBDIR is defined) use a different preferences directory
@ -901,6 +895,13 @@ class TreeMetadataEmitter(LoggingMixin):
xpidl_module, add_to_manifest=not context['XPIDL_NO_MANIFEST']) xpidl_module, add_to_manifest=not context['XPIDL_NO_MANIFEST'])
def _process_generated_files(self, context): def _process_generated_files(self, context):
for path in context['CONFIGURE_DEFINE_FILES']:
script = mozpath.join(mozpath.dirname(mozpath.dirname(__file__)),
'action', 'process_define_files.py')
yield GeneratedFile(context, script, 'process_define_file',
unicode(path),
[mozpath.join(context.srcdir, path + '.in')])
generated_files = context.get('GENERATED_FILES') generated_files = context.get('GENERATED_FILES')
if not generated_files: if not generated_files:
return return