diff options
author | Mats Wichmann <mats@linux.com> | 2020-04-16 20:17:45 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2020-04-16 20:20:04 (GMT) |
commit | 944270dc1fd82c6fbb43f414f0ae87b2d3fe3976 (patch) | |
tree | ddd548ef2b2594c64574a7e9dfdb38f4e4aa703a /bin/scons-proc.py | |
parent | 88449724330bb0864b74d6ff1b30b26eb03eff4b (diff) | |
download | SCons-944270dc1fd82c6fbb43f414f0ae87b2d3fe3976.zip SCons-944270dc1fd82c6fbb43f414f0ae87b2d3fe3976.tar.gz SCons-944270dc1fd82c6fbb43f414f0ae87b2d3fe3976.tar.bz2 |
[PR #3612] doc update: cvars are <envar> [ci skip]
Consider construction variable as environment variables,
using that markup in scons.xml and generating it into
the variables.gen file (which is included in man and userguide).
If possible, use the entity from variables.mod, which
already has the envar markup generated.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'bin/scons-proc.py')
-rw-r--r-- | bin/scons-proc.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/scons-proc.py b/bin/scons-proc.py index 4370004..30832a0 100644 --- a/bin/scons-proc.py +++ b/bin/scons-proc.py @@ -273,7 +273,7 @@ class Builder(SConsThing): """ # build term for global function gterm = stf.newNode("term") - func = stf.newSubNode(gterm, "function") + func = stf.newSubNode(gterm, Builder.tag) stf.setText(func, self.name) stf.setTail(func, '()') @@ -282,6 +282,7 @@ class Builder(SConsThing): inst = stf.newSubNode(mterm, "parameter") stf.setText(inst, "env") stf.setTail(inst, ".") + # we could use <function> here, but it's a "method" meth = stf.newSubNode(mterm, "methodname") stf.setText(meth, self.name) stf.setTail(meth, '()') @@ -318,7 +319,7 @@ class Function(SConsThing): if signature in ('both', 'global'): # build term for global function gterm = stf.newNode("term") - func = stf.newSubNode(gterm, "function") + func = stf.newSubNode(gterm, Function.tag) stf.setText(func, self.name) if sig: # if there are parameters, use that entity @@ -335,6 +336,7 @@ class Function(SConsThing): inst = stf.newSubNode(mterm, "replaceable") stf.setText(inst, "env") stf.setTail(inst, ".") + # we could use <function> here, but it's a "method" meth = stf.newSubNode(mterm, "methodname") stf.setText(meth, self.name) if sig: @@ -371,6 +373,12 @@ class Variable(SConsThing): description = 'construction variable' prefix = 'cv-' tag = 'envar' + + def xml_terms(self): + term = stf.newNode("term") + var = stf.newSubNode(term, Variable.tag) + stf.setText(var, self.name) + return [term] def entityfunc(self): return '$' + self.name |