Bug 751795 - Part 4: Add flags to _run_make to control behavior; r=jhammel

This commit is contained in:
Gregory Szorc 2012-09-26 16:40:14 -07:00
parent 23f85aa000
commit a03757ae9c

View File

@ -184,7 +184,7 @@ class MozbuildObject(object):
def _run_make(self, directory=None, filename=None, target=None, log=True,
srcdir=False, allow_parallel=True, line_handler=None, env=None,
ignore_errors=False):
ignore_errors=False, silent=True, print_directory=True):
"""Invoke make.
directory -- Relative directory to look for Makefile in.
@ -193,6 +193,9 @@ class MozbuildObject(object):
strings.
srcdir -- If True, invoke make from the source directory tree.
Otherwise, make will be invoked from the object directory.
silent -- If True (the default), run make in silent mode.
print_directory -- If True (the default), have make print directories
while doing traversal.
"""
self._ensure_objdir_exists()
@ -210,14 +213,15 @@ class MozbuildObject(object):
if ignore_errors:
args.append('-k')
# Silent mode by default.
args.append('-s')
if silent:
args.append('-s')
# Print entering/leaving directory messages. Some consumers look at
# these to measure progress. Ideally, we'd do everything with pymake
# and use hooks in its API. Unfortunately, it doesn't provide that
# feature... yet.
args.append('-w')
if print_directory:
args.append('-w')
if isinstance(target, list):
args.extend(target)