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
 | 
			
		||||
 | 
			
		||||
    def sconscript(env, sconscript, clone=False, *args, **kwargs):
 | 
			
		||||
        exports = {'Library': env.Library,
 | 
			
		||||
                   'StaticLibrary': env.StaticLibrary,
 | 
			
		||||
                   'SharedLibrary': env.SharedLibrary,
 | 
			
		||||
                   'Program': env.Program,
 | 
			
		||||
 | 
			
		||||
                   'Append': env.Append,
 | 
			
		||||
                   'Replace': env.Replace}
 | 
			
		||||
        exports = {
 | 
			
		||||
            'Library': env.Library,
 | 
			
		||||
            'Object': env.Object,
 | 
			
		||||
            'SharedObject': env.SharedObject,
 | 
			
		||||
            'StaticLibrary': env.StaticLibrary,
 | 
			
		||||
            'SharedLibrary': env.SharedLibrary,
 | 
			
		||||
            'Program': env.Program,
 | 
			
		||||
            'env': env.Clone() if clone else env,
 | 
			
		||||
        }
 | 
			
		||||
        SCons.Script._SConscript.GlobalDict.update(exports)
 | 
			
		||||
        env.log('Reading {}'.format(sconscript))
 | 
			
		||||
        return original_sconscript(sconscript,
 | 
			
		||||
                                   {'env': env.Clone() if clone else env},
 | 
			
		||||
                                   *args,
 | 
			
		||||
                                   **kwargs)
 | 
			
		||||
        return original_sconscript(sconscript, {}, *args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    return sconscript
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue