mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
build.py: Show build progress
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
ca8a7979ef
commit
39ec72e0d4
1 changed files with 10 additions and 3 deletions
|
|
@ -95,16 +95,17 @@ def calculate_order(order, modules, prereq_type):
|
|||
return 1
|
||||
|
||||
def run_make(module, target):
|
||||
cur_project=cur_project+1
|
||||
make_cmd = "make " + target + " 2>&1"
|
||||
path = find_proj_path(module)
|
||||
print(',---------- running ' + make_cmd + ' in ' + path + ' -------------------------- >')
|
||||
print(',---------- %d / %d: running %s in %s -------------------------- >' % (cur_project, len(order), make_cmd, path))
|
||||
os.chdir(path)
|
||||
p = subprocess.Popen(make_cmd, shell=True, stdout=subprocess.PIPE)
|
||||
for line in iter(p.stdout.readline, ''):
|
||||
sys.stdout.write('| ' + line) # avoid extra newlines from print()
|
||||
sys.stdout.flush()
|
||||
p.wait()
|
||||
print('`---------- running ' + make_cmd + ' in ' + path + ' -------------------------- <')
|
||||
print('`---------- %d / %d: running %s in %s -------------------------- <' % (cur_project, len(order), make_cmd, path))
|
||||
if p.returncode:
|
||||
print(make_cmd + ' failed')
|
||||
raise Exception(time.strftime("%Y-%m-%d %H:%M") + ": failed to make target " + target + " in module " + module + " below base " + proj_base)
|
||||
|
|
@ -155,7 +156,13 @@ if target == 'order':
|
|||
print(' '.join(order))
|
||||
exit(0)
|
||||
|
||||
print("order is: " + ' '.join(order))
|
||||
cur_project=0
|
||||
print("Building target %s in %d projects:" % (target, len(order)))
|
||||
for m in order:
|
||||
cur_project=cur_project+1
|
||||
print(" %3d %s" % (cur_project, m))
|
||||
cur_project=0
|
||||
|
||||
build(modules, order, target)
|
||||
|
||||
print(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue