From b2038e76d3231d28af5b544c160cb4cd7120ec1d Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 11 Apr 2019 01:38:00 +0300 Subject: [PATCH] waflib: subproject: carefully restore previous enviroment in configuration context --- scripts/waflib/subproject.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/waflib/subproject.py b/scripts/waflib/subproject.py index c09ed74d..4c1a6353 100644 --- a/scripts/waflib/subproject.py +++ b/scripts/waflib/subproject.py @@ -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: