Browse Source

waflib: subproject: carefully restore previous enviroment in configuration context

pull/2/head
Alibek Omarov 6 years ago
parent
commit
b2038e76d3
  1. 6
      scripts/waflib/subproject.py

6
scripts/waflib/subproject.py

@ -110,12 +110,14 @@ def add_subproject(ctx, names): @@ -110,12 +110,14 @@ def add_subproject(ctx, names):
ctx.msg(msg='--X %s' % depth(), result='ignored', color='YELLOW')
depth_pop()
return
ctx.setenv(name, ctx.env) # derive new env from
saveenv = ctx.env
ctx.setenv(name, ctx.env) # derive new env from previous
ctx.env.ENVNAME = name
ctx.msg(msg='--> %s' % depth(), result='in progress', color='BLUE')
ctx.recurse(name)
ctx.msg(msg='<-- %s' % depth(), result='done', color='BLUE')
ctx.setenv('')
ctx.setenv('') # save env changes
ctx.env = saveenv # but use previous
depth_pop()
else:
if not ctx.all_envs:

Loading…
Cancel
Save