aboutsummaryrefslogtreecommitdiff
path: root/bootstrap.py
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-01-04 15:36:53 -0800
committerEvan Martin <martine@danga.com>2012-01-04 15:36:53 -0800
commitd539655e51f36f11a74c582132986d89ebfab7c7 (patch)
treec8de3d02f8557e31bbf19dab86d50d1ee81320c9 /bootstrap.py
parenta0c058f792c9b2d8f2e86bcdee718410b008e29c (diff)
downloadninja-d539655e51f36f11a74c582132986d89ebfab7c7.tar.gz
don't attempt to build browse.* in bootstrap mode
Diffstat (limited to 'bootstrap.py')
-rwxr-xr-xbootstrap.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/bootstrap.py b/bootstrap.py
index 6a7d876..2622075 100755
--- a/bootstrap.py
+++ b/bootstrap.py
@@ -41,19 +41,17 @@ except OSError, e:
if e.errno != errno.EEXIST:
raise
-with open('src/browse.py') as browse_py:
- with open('build/browse_py.h', 'w') as browse_py_h:
- hex_str = ''.join([hex(ord(c)) for c in browse_py.read()])
- src = "const char %s[]=\"\n%s\n\";" % ('kBrowsePy', hex_str)
- browse_py_h.write(src)
-
sources = []
for src in glob.glob('src/*.cc'):
if src.endswith('test.cc') or src.endswith('.in.cc'):
continue
+ filename = os.path.basename(src)
+ if filename == 'browse.cc': # Depends on generated header.
+ continue
+
if sys.platform.startswith('win32'):
- if src.endswith('\\browse.cc') or src.endswith('\\subprocess.cc'):
+ if filename == 'subprocess.cc':
continue
else:
if src.endswith('-win32.cc'):
@@ -69,7 +67,8 @@ if vcdir:
args = [os.path.join(vcdir, 'bin', 'cl.exe'), '/nologo', '/EHsc', '/DWIN32']
else:
args = [os.environ.get('CXX', 'g++'), '-Wno-deprecated',
- '-DNINJA_PYTHON="' + sys.executable + '"']
+ '-DNINJA_PYTHON="' + sys.executable + '"',
+ '-DNINJA_BOOTSTRAP']
args.extend(cflags)
args.extend(ldflags)
binary = 'ninja.bootstrap'