diff options
author | Evan Martin <martine@danga.com> | 2012-09-11 04:23:08 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-09-11 04:23:08 (GMT) |
commit | ce825d2f6e2bb8a0fa0bb97fe961d5f194f8f6f8 (patch) | |
tree | ff1c792a1e757a1e16418a4a8c3287f708e80037 | |
parent | fcbfc161e758f22e8dfee4a8b5b3feaca1db86ff (diff) | |
parent | 547f959c567fae22a4e2acf1c782b6857b657f8c (diff) | |
download | Ninja-ce825d2f6e2bb8a0fa0bb97fe961d5f194f8f6f8.zip Ninja-ce825d2f6e2bb8a0fa0bb97fe961d5f194f8f6f8.tar.gz Ninja-ce825d2f6e2bb8a0fa0bb97fe961d5f194f8f6f8.tar.bz2 |
Merge pull request #414 from riannucci/master
Fix re2c detection in bootstrap which breaks win32 w/ gnuwin32
-rwxr-xr-x | configure.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.py b/configure.py index c2daf0a..ca6615c 100755 --- a/configure.py +++ b/configure.py @@ -241,8 +241,8 @@ n.comment('the depfile parser and ninja lexers are generated using re2c.') 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(): @@ -253,8 +253,8 @@ if 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.') |