2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-25 19:30:04 +01:00
This commit is contained in:
Thomas Nagy 2011-10-26 21:57:58 +02:00
parent 01b821fbc3
commit 665fa4294c

View File

@ -111,7 +111,8 @@ class ConfigurationContext(Context.Context):
def setenv(self, name, env=None):
"""
Set a new config set for conf.env
Set a new config set for conf.env. If a config set of that name already exists,
recall it without modification.
The name is the filename prefix to save to ``c4che/NAME_cache.py``, and it
is also used as *variants* by the build commands.
@ -130,12 +131,13 @@ class ConfigurationContext(Context.Context):
:param env: ConfigSet to copy, or an empty ConfigSet is created
:type env: :py:class:`waflib.ConfigSet.ConfigSet`
"""
if not env:
env = ConfigSet.ConfigSet()
self.prepare_env(env)
else:
env = env.derive()
self.all_envs[name] = env
if name not in self.all_envs or env:
if not env:
env = ConfigSet.ConfigSet()
self.prepare_env(env)
else:
env = env.derive()
self.all_envs[name] = env
self.variant = name
def get_env(self):