diff options
author | Evan Martin <martine@danga.com> | 2012-08-16 18:28:03 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-08-16 18:28:03 (GMT) |
commit | 0b531af962d01009621fb98ce533fdaf86c48d3a (patch) | |
tree | a2b3c5bc1283915398938aa83de4d16cbfce1371 /configure.py | |
parent | ee063d100b5d93a0ae0127a7b3f86e1d5a37a660 (diff) | |
download | Ninja-0b531af962d01009621fb98ce533fdaf86c48d3a.zip Ninja-0b531af962d01009621fb98ce533fdaf86c48d3a.tar.gz Ninja-0b531af962d01009621fb98ce533fdaf86c48d3a.tar.bz2 |
use 4 space tabs in configure.py, warn on re2c missing
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/configure.py b/configure.py index 287f58a..85661b7 100755 --- a/configure.py +++ b/configure.py @@ -234,21 +234,22 @@ if platform not in ('mingw', 'windows'): 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 - except OSError: - return False + import subprocess + try: + subprocess.call(['re2c', '-v'], stdout=subprocess.PIPE) + return True + except OSError: + return False if has_re2c(): - n.rule('re2c', - command='re2c -b -i --no-generation-date -o $out $in', - description='RE2C $out') - # Generate the .cc files in the source directory so we can check them in. - n.build(src('depfile_parser.cc'), 're2c', src('depfile_parser.in.cc')) - n.build(src('lexer.cc'), 're2c', src('lexer.in.cc')) + n.rule('re2c', + command='re2c -b -i --no-generation-date -o $out $in', + description='RE2C $out') + # Generate the .cc files in the source directory so we can check them in. + n.build(src('depfile_parser.cc'), 're2c', src('depfile_parser.in.cc')) + n.build(src('lexer.cc'), 're2c', src('lexer.in.cc')) else: - n.comment('(re2c not found, using checked-in cc files instead.)') + print ("warning: re2c not found; changes to src/*.in.cc will not affect " + "your build.") n.newline() n.comment('Core source files all build into ninja library.') |