summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xBuildTools/scons2ninja.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/BuildTools/scons2ninja.py b/BuildTools/scons2ninja.py
index 0ca3e42..a39ed32 100755
--- a/BuildTools/scons2ninja.py
+++ b/BuildTools/scons2ninja.py
@@ -332,71 +332,71 @@ ninja.rule('ibtool',
command = '$ibtool $ibtoolflags --compile $out $in',
description = 'IBTOOL $out')
ninja.rule('dsymutil',
command = '$dsymutil $dsymutilflags -o $out $in',
description = 'DSYMUTIL $out')
ninja.rule('generator',
command = "python " + SCRIPT + " ${scons_args}",
depfile = ".scons2ninja.deps",
pool = 'scons_pool',
generator = '1',
description = 'Regenerating build.ninja')
ninja.rule('sdef',
command = 'sdef $in | sdp -fh --basename $basename -o $outdir',
description = 'SDEF $out')
################################################################################
# Build Statements
################################################################################
scons_generate_cmd = scons_cmd + " " + SCONS_ARGS + " --tree=all,prune dump_trace=1"
#scons_generate_cmd = 'cmd /c type scons2ninja.in'
#scons_generate_cmd = 'cat scons2ninja.in'
# Pass 1: Parse dependencies (and prefilter some build rules)
build_lines = []
dependencies = {}
mtflags = {}
previous_file = None
f = subprocess.Popen(scons_generate_cmd, stdout = subprocess.PIPE, stderr = subprocess.PIPE, shell=True)
stage = 'preamble'
skip_nth_line = -1
stack = ['.']
-for line in f.stdout.readlines() :
+for line in f.stdout :
line = line.rstrip()
# Skip lines if requested from previous command
if skip_nth_line >= 0 :
skip_nth_line -= 1
if skip_nth_line == 0 :
continue
if line.startswith('scons: done building targets') :
break
if stage == "preamble" :
# Pass all lines from the SCons configuration step to output
if re.match("^scons: Building targets ...", line) :
stage = "build"
else :
print line
elif stage == "build" :
if line.startswith('+-') :
stage = "dependencies"
elif re.match("^Using tempfile", line) :
# Ignore response files from MSVS
skip_nth_line = 2
else :
build_lines.append(line)
# Already detect targets that will need 'mt'
tool, _, flags = parse_tool_command(line)
if tool == 'mt' :
target = get_unary_flags("-outputresource:", flags)[0]
target = target[0:target.index(';')]
mtflags[target] = flags
elif stage == "dependencies" :