fix generator.py call in scons 3
scons 3 still untested
This commit is contained in:
parent
a97dad4db5
commit
553b36b31c
10
SConstruct
10
SConstruct
@ -1,12 +1,12 @@
|
||||
import sys
|
||||
#run generator.py
|
||||
if sys.version_info[0] >= 3:
|
||||
def execfile(path):
|
||||
with open(path, 'r') as f:
|
||||
exec(f.read())
|
||||
|
||||
if not GetOption('clean'):
|
||||
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)
|
||||
|
||||
AddOption('--builddir',dest="builddir",default="build",help="Directory to build to.")
|
||||
SConscript('SConscript', variant_dir=GetOption('builddir'), duplicate=0)
|
||||
|
Loading…
Reference in New Issue
Block a user