Skip to content

Commit

Permalink
Merge pull request ninja-build#414 from riannucci/master
Browse files Browse the repository at this point in the history
Fix re2c detection in bootstrap which breaks win32 w/ gnuwin32
  • Loading branch information
evmar committed Sep 11, 2012
2 parents fcbfc16 + 547f959 commit ce825d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ def shell_escape(str):
def has_re2c():
import subprocess
try:
subprocess.call(['re2c', '-v'], stdout=subprocess.PIPE)
return True
proc = subprocess.Popen(['re2c', '-V'], stdout=subprocess.PIPE)
return int(proc.communicate()[0], 10) >= 1103
except OSError:
return False
if has_re2c():
Expand All @@ -253,8 +253,8 @@ def has_re2c():
n.build(src('depfile_parser.cc'), 're2c', src('depfile_parser.in.cc'))
n.build(src('lexer.cc'), 're2c', src('lexer.in.cc'))
else:
print ("warning: re2c not found; changes to src/*.in.cc will not affect "
"your build.")
print ("warning: A compatible version of re2c (>= 0.11.3) was not found; "
"changes to src/*.in.cc will not affect your build.")
n.newline()

n.comment('Core source files all build into ninja library.')
Expand Down

0 comments on commit ce825d2

Please sign in to comment.