mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-24 18:59:39 +01:00
Update tutorial.rst to clarify that the env attribute is shared between the cnf and bld parameters to their respective methods.
This commit is contained in:
parent
2831c75093
commit
6fba8d3742
@ -62,7 +62,7 @@ by using the *${}* symbol, which reads the values from the attribute bld.env::
|
|||||||
bld(rule='echo ${MESSAGE}', always=True)
|
bld(rule='echo ${MESSAGE}', always=True)
|
||||||
|
|
||||||
The bld object is an instance of :py:class:`waflib.Build.BuildContext`, its *env* attribute is an instance :py:class:`waflib.ConfigSet.ConfigSet`.
|
The bld object is an instance of :py:class:`waflib.Build.BuildContext`, its *env* attribute is an instance :py:class:`waflib.ConfigSet.ConfigSet`.
|
||||||
The values are set in this object to be shared/stored/loaded easily. Here is how to do the same thing by sharing data between the configuration and build::
|
This object is also accessible as an attribute on the `configure()` method's `cnf` parameter. Therefore, values can be shared/stored/loaded easily:
|
||||||
|
|
||||||
def configure(cnf):
|
def configure(cnf):
|
||||||
cnf.env.MESSAGE = 'Hello, world!'
|
cnf.env.MESSAGE = 'Hello, world!'
|
||||||
|
Loading…
Reference in New Issue
Block a user