2017-10-07 16:31:05 -05:00
|
|
|
import sys
|
2014-06-08 18:33:58 -05:00
|
|
|
#run generator.py
|
|
|
|
if not GetOption('clean'):
|
2017-10-09 22:59:50 -05:00
|
|
|
if sys.version_info[0] < 3:
|
|
|
|
execfile("generator.py")
|
|
|
|
else:
|
|
|
|
with open("generator.py") as f:
|
|
|
|
code = compile(f.read(), "generator.py", 'exec')
|
|
|
|
exec(code)
|
2014-06-08 18:33:58 -05:00
|
|
|
|
2013-03-25 08:09:55 -05:00
|
|
|
AddOption('--builddir',dest="builddir",default="build",help="Directory to build to.")
|
|
|
|
SConscript('SConscript', variant_dir=GetOption('builddir'), duplicate=0)
|
2014-06-08 18:33:58 -05:00
|
|
|
if GetOption('clean'):
|
|
|
|
import os, shutil
|
|
|
|
try:
|
|
|
|
shutil.rmtree(".sconf_temp/")
|
|
|
|
except:
|
2017-10-03 20:14:16 -05:00
|
|
|
print("couldn't remove .sconf_temp/")
|
2014-06-09 15:50:49 -05:00
|
|
|
|
|
|
|
try:
|
|
|
|
shutil.rmtree("generated/")
|
|
|
|
except:
|
2017-10-03 20:14:16 -05:00
|
|
|
print("couldn't remove generated/")
|
2014-06-09 15:50:49 -05:00
|
|
|
|
2014-06-08 18:33:58 -05:00
|
|
|
try:
|
|
|
|
os.remove(".sconsign.dblite")
|
|
|
|
except:
|
2017-10-03 20:14:16 -05:00
|
|
|
print("couldn't remove .sconsign.dblite")
|