Property export env
This commit is contained in:
parent
84b5595490
commit
146b177ca9
1 changed files with 10 additions and 11 deletions
|
@ -11,19 +11,18 @@ def _do_sconscript(env):
|
||||||
original_sconscript = env.SConscript
|
original_sconscript = env.SConscript
|
||||||
|
|
||||||
def sconscript(env, sconscript, clone=False, *args, **kwargs):
|
def sconscript(env, sconscript, clone=False, *args, **kwargs):
|
||||||
exports = {'Library': env.Library,
|
exports = {
|
||||||
'StaticLibrary': env.StaticLibrary,
|
'Library': env.Library,
|
||||||
'SharedLibrary': env.SharedLibrary,
|
'Object': env.Object,
|
||||||
'Program': env.Program,
|
'SharedObject': env.SharedObject,
|
||||||
|
'StaticLibrary': env.StaticLibrary,
|
||||||
'Append': env.Append,
|
'SharedLibrary': env.SharedLibrary,
|
||||||
'Replace': env.Replace}
|
'Program': env.Program,
|
||||||
|
'env': env.Clone() if clone else env,
|
||||||
|
}
|
||||||
SCons.Script._SConscript.GlobalDict.update(exports)
|
SCons.Script._SConscript.GlobalDict.update(exports)
|
||||||
env.log('Reading {}'.format(sconscript))
|
env.log('Reading {}'.format(sconscript))
|
||||||
return original_sconscript(sconscript,
|
return original_sconscript(sconscript, {}, *args, **kwargs)
|
||||||
{'env': env.Clone() if clone else env},
|
|
||||||
*args,
|
|
||||||
**kwargs)
|
|
||||||
|
|
||||||
return sconscript
|
return sconscript
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue