diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/mozbuild/mozbuild/action/dump_env.py | 8 | ||||
-rw-r--r-- | python/mozbuild/mozbuild/controller/clobber.py | 2 | ||||
-rw-r--r-- | python/mozbuild/mozbuild/mach_commands.py | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/python/mozbuild/mozbuild/action/dump_env.py b/python/mozbuild/mozbuild/action/dump_env.py index a6fa19f3a..83e420d68 100644 --- a/python/mozbuild/mozbuild/action/dump_env.py +++ b/python/mozbuild/mozbuild/action/dump_env.py @@ -6,5 +6,11 @@ # native paths printed on Windows so that these paths can be incorporated # into Python configure's environment. import os +import sys + +sys.path.append(os.path.join(os.path.dirname(__file__), '..')) + +from shellutil import quote + for key, value in os.environ.items(): - print('%s=%s' % (key, value)) + print('%s=%s' % (key, quote(value))) diff --git a/python/mozbuild/mozbuild/controller/clobber.py b/python/mozbuild/mozbuild/controller/clobber.py index 02f75c6ad..d3cdfd596 100644 --- a/python/mozbuild/mozbuild/controller/clobber.py +++ b/python/mozbuild/mozbuild/controller/clobber.py @@ -169,6 +169,7 @@ class Clobberer(object): if not self.clobber_needed(): print('Clobber not needed.', file=fh) + fh.flush() self.ensure_objdir_state() return False, False, None @@ -190,6 +191,7 @@ class Clobberer(object): 'Cannot clobber while the shell is inside the object directory.') print('Automatically clobbering %s' % self.topobjdir, file=fh) + fh.flush() try: self.remove_objdir(False) self.ensure_objdir_state() diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 1bd5b8d34..a45656b37 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -546,7 +546,7 @@ class Build(MachCommandBase): # We skip if, ifdef, ifndef, else, elif, elifdef and elifndef, because they are never used alone grepcmd = 'grep -E -r "^(#|%)(define|endif|error|expand|filter|include|literal|undef|unfilter)" '\ + '--include=\*.{css,dtd,html,js,jsm,xhtml,xml,xul,manifest,properties,rdf} '\ - + self.topobjdir + '/dist/bin | grep -v ".css:#"' + + self.topobjdir + '/dist/bin | 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) |