mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-26 03:39:53 +01:00
This commit is contained in:
parent
01b821fbc3
commit
665fa4294c
@ -111,7 +111,8 @@ class ConfigurationContext(Context.Context):
|
|||||||
|
|
||||||
def setenv(self, name, env=None):
|
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
|
The name is the filename prefix to save to ``c4che/NAME_cache.py``, and it
|
||||||
is also used as *variants* by the build commands.
|
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
|
:param env: ConfigSet to copy, or an empty ConfigSet is created
|
||||||
:type env: :py:class:`waflib.ConfigSet.ConfigSet`
|
:type env: :py:class:`waflib.ConfigSet.ConfigSet`
|
||||||
"""
|
"""
|
||||||
if not env:
|
if name not in self.all_envs or env:
|
||||||
env = ConfigSet.ConfigSet()
|
if not env:
|
||||||
self.prepare_env(env)
|
env = ConfigSet.ConfigSet()
|
||||||
else:
|
self.prepare_env(env)
|
||||||
env = env.derive()
|
else:
|
||||||
self.all_envs[name] = env
|
env = env.derive()
|
||||||
|
self.all_envs[name] = env
|
||||||
self.variant = name
|
self.variant = name
|
||||||
|
|
||||||
def get_env(self):
|
def get_env(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user