From abf55a5284811ddaa5dcc5d67730cda00d4bdda0 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 17 Dec 2015 14:03:44 +0900 Subject: [PATCH] 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. --- python/mozbuild/mozbuild/frontend/emitter.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py index 3a45b3210816..918a27bf58df 100644 --- a/python/mozbuild/mozbuild/frontend/emitter.py +++ b/python/mozbuild/mozbuild/frontend/emitter.py @@ -547,12 +547,6 @@ class TreeMetadataEmitter(LoggingMixin): yield self._create_substitution(ConfigFileSubstitution, context, 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): yield obj @@ -689,7 +683,7 @@ class TreeMetadataEmitter(LoggingMixin): if mozpath.basename(f.full_path) not in generated_files: raise SandboxValidationError( ('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 # 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']) 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') if not generated_files: return