summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/mozbuild/mozbuild/base.py7
-rw-r--r--python/mozbuild/mozbuild/mach_commands.py32
-rw-r--r--python/mozbuild/mozpack/packager/formats.py1
-rw-r--r--python/mozbuild/mozpack/test/test_packager_formats.py1
4 files changed, 25 insertions, 16 deletions
diff --git a/python/mozbuild/mozbuild/base.py b/python/mozbuild/mozbuild/base.py
index 9d5897a34..9db1005d1 100644
--- a/python/mozbuild/mozbuild/base.py
+++ b/python/mozbuild/mozbuild/base.py
@@ -352,6 +352,13 @@ class MozbuildObject(ProcessExecutionMixin):
return _config_guess_output[0]
p = os.path.join(self.topsrcdir, 'build', 'autoconf', 'config.guess')
+
+ # Try looking for mozilla, for comm-central
+ if not os.path.isfile(p):
+ p = os.path.join(self.topsrcdir, 'mozilla', 'build', 'autoconf', 'config.guess')
+
+ if not os.path.isfile(p):
+ p = os.path.join(self.topsrcdir, 'platform', 'build', 'autoconf', 'config.guess')
# This is a little kludgy. We need access to the normalize_command
# function. However, that's a method of a mach mixin, so we need a
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
index 5933a5aa9..bd3fbe921 100644
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -541,20 +541,24 @@ class Build(MachCommandBase):
# as when doing OSX Universal builds)
pass
- # Check if there are any unpreprocessed files in '@MOZ_OBJDIR@/dist/bin'
- # See python/mozbuild/mozbuild/preprocessor.py#L293-L309 for the list of directives
- # We skip if, ifdef, ifndef, else, elif, elifdef and elifndef, because they are never used alone
- #
- # The original version of this script only worked with GNU grep because of the --include flag.
- # Not a problem in and of itself, except that it didn't take TOOLCHAIN_PREFIX and simply assumed
- # all operating systems use GNU grep as the system grep (often it's called ggrep or something).
- # This script is a bit slower, but should do the same thing on all Unix platforms.
-
- grepcmd = 'find ' + self.topobjdir + '/dist/bin' + ' -name \'\*.{css,dtd,html,js,jsm,xhtml,xml,xul,manifest,properties,rdf}\' ' + '| xargs grep -E "^(#|%)(define|endif|error|expand|filter|include|literal|undef|unfilter)" '\
- + '| awk "/\.css:%/ || (!/\.css/ && /:#/)"'
- grepresult = subprocess.Popen(grepcmd, stdout=subprocess.PIPE, shell=True).communicate()[0]
- if grepresult:
- print('\nERROR: preprocessor was not applied to the following files:\n\n' + grepresult)
+ # Check for un-preprocessed files.. In case something goes wrong it will be noted
+ ppcheck_script = mozpath.join(self.topsrcdir, "build", "ppCheck.py")
+ ppcheck_path = mozpath.join(self.topobjdir, "dist", "bin")
+ if not os.path.exists(ppcheck_script):
+ ppcheck_script = mozpath.join(self.topsrcdir, "mozilla", "build", "ppCheck.py")
+
+ if not os.path.exists(ppcheck_script):
+ ppcheck_script = mozpath.join(self.topsrcdir, "platform", "build", "ppCheck.py")
+ else:
+ ppcheck_script = None
+
+ if ppcheck_script:
+ ppcheck_cmd = [which.which("python2.7"), ppcheck_script, ppcheck_path]
+ ppcheck_result = subprocess.call(ppcheck_cmd, cwd=self.topsrcdir)
+
+ if not ppcheck_script or ppcheck_result:
+ print("\nWARNING: Something has gone wrong with the check for un-preprocessed files. " +
+ "Please manually verify that files are properly preprocessed.")
return status
diff --git a/python/mozbuild/mozpack/packager/formats.py b/python/mozbuild/mozpack/packager/formats.py
index cedd1998b..235fc3e90 100644
--- a/python/mozbuild/mozpack/packager/formats.py
+++ b/python/mozbuild/mozpack/packager/formats.py
@@ -320,5 +320,4 @@ class OmniJarSubFormatter(PiecemealFormatter):
'modules',
'goanna.js',
'hyphenation',
- 'update.locale',
] or path[0] in STARTUP_CACHE_PATHS
diff --git a/python/mozbuild/mozpack/test/test_packager_formats.py b/python/mozbuild/mozpack/test/test_packager_formats.py
index 66a7cc8e6..4ba61e880 100644
--- a/python/mozbuild/mozpack/test/test_packager_formats.py
+++ b/python/mozbuild/mozpack/test/test_packager_formats.py
@@ -407,7 +407,6 @@ class TestFormatters(unittest.TestCase):
self.assertTrue(is_resource(base, 'modules/foo.jsm'))
self.assertTrue(is_resource(base, 'goanna.js'))
self.assertTrue(is_resource(base, 'hyphenation/foo'))
- self.assertTrue(is_resource(base, 'update.locale'))
self.assertTrue(
is_resource(base, 'jsloader/resource/gre/modules/foo.jsm'))
self.assertFalse(is_resource(base, 'foo'))