diff options
Diffstat (limited to 'SConscript')
| -rwxr-xr-x | SConscript | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -89,6 +89,7 @@ AddOption('--stable',dest="stable",default=True,help="Non snapshot build") AddOption('--aao', dest="everythingAtOnce", action='store_true', default=False, help="Compile the whole game without generating intermediate objects (very slow), enable this when using compilers like clang or mscc that don't support -fkeep-inline-functions") AddOption('--fullclean',dest="justwork",action='store_true',default=False,help="for when nothing else works. Deletes all sconscript temporary files.") +AddOption('--copy-env',dest="copy_env",action='store_true',default=False,help="copy some common enviroment variables from the parent enviroment.") # using one of these commandline options is compulsory @@ -138,6 +139,14 @@ if(GetOption('win')): else: env = Environment(tools = ['default'], ENV = os.environ) +if(GetOption("copy_env")): + lstvar=["CC","CXX","LD","CFLAGS"] + print "WARNING: enviroment copying enabled. changes in the enviroment can easily break the build process." + for var in lstvar: + if var in os.environ: + env[var]=os.environ[var] + print "WARNING: copying enviroment variable {}={!r}".format(var,os.environ[var]) + # macosx specific platform settings # +++++++++++++++++++++++++++++++++ |
