avocado.utils.build: Improve build.make() function

Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 d3ea3670
......@@ -2,7 +2,7 @@ import os
import process
def make(path, extra='', make='make', ignore_status=False):
def make(path, make='make', extra_args='', ignore_status=False):
"""
Run make, adding MAKEOPTS to the list of options.
......@@ -10,7 +10,12 @@ def make(path, extra='', make='make', ignore_status=False):
"""
cwd = os.getcwd()
os.chdir(path)
cmd = '%s %s %s' % (make, os.environ.get('MAKEOPTS', ''), extra)
cmd = make
makeopts = os.environ.get('MAKEOPTS', '')
if makeopts:
cmd += ' %s' % makeopts
if extra_args:
cmd += ' %s' % extra_args
make_process = process.system(cmd, ignore_status=ignore_status)
os.chdir(cwd)
return make_process
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册