diff --git a/scripts/build.py b/scripts/build.py index 6c00d5a7..3e1f5d01 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -122,7 +122,8 @@ def calculate_order(order, modules, prereq_types): def run_make(module, target): global cur_project cur_project=cur_project+1 - make_cmd = "make " + target + " 2>&1" + #make_cmd = "make " + target + " 2>&1" + make_cmd = [ "make", target ] path = find_proj_path_cached(module) delim_len=120 delim='---- %d/%d: running %s in %s -' % (cur_project, len(order), make_cmd, path) @@ -130,7 +131,7 @@ def run_make(module, target): print(',' + delim + ' >') os.chdir(path) - p = subprocess.Popen(make_cmd, shell=True, stdout=subprocess.PIPE) + p = subprocess.Popen(make_cmd, shell=False, stdout=subprocess.PIPE, stderr=None, close_fds=True) for line in iter(p.stdout.readline, ''): sys.stdout.write('| ' + line) # avoid extra newlines from print() sys.stdout.flush()