summaryrefslogtreecommitdiffstats
path: root/bootstrap.py
diff options
context:
space:
mode:
authorScott Graham <sgraham@gmail.com>2012-01-04 01:04:49 (GMT)
committerEvan Martin <martine@danga.com>2012-01-04 01:04:49 (GMT)
commit6d338066d09b825aa18f453090333d477e2a9a06 (patch)
tree9b756cb905f1365daefe9fd40a0c59bf89108f42 /bootstrap.py
parentd0742f5635c6f5f998a7dce4991e51a0956c4cb1 (diff)
downloadNinja-6d338066d09b825aa18f453090333d477e2a9a06.zip
Ninja-6d338066d09b825aa18f453090333d477e2a9a06.tar.gz
Ninja-6d338066d09b825aa18f453090333d477e2a9a06.tar.bz2
windows: make bootstrap.py/configure.py work with MSVC
Diffstat (limited to 'bootstrap.py')
-rwxr-xr-xbootstrap.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bootstrap.py b/bootstrap.py
index db86b96..4d2b4be 100755
--- a/bootstrap.py
+++ b/bootstrap.py
@@ -64,13 +64,16 @@ args = [os.environ.get('CXX', 'g++'), '-Wno-deprecated',
'-DNINJA_PYTHON="' + sys.executable + '"']
args.extend(cflags)
args.extend(ldflags)
-args.extend(['-o', 'ninja.bootstrap'])
+binary = 'ninja.bootstrap'
+if sys.platform.startswith('win32'):
+ binary = 'ninja.bootstrap.exe'
+args.extend(['-o', binary])
args.extend(sources)
run(args)
print 'Building ninja using itself...'
run([sys.executable, 'configure.py'] + sys.argv[1:])
-run(['./ninja.bootstrap'])
-os.unlink('ninja.bootstrap')
+run(['./' + binary])
+os.unlink(binary)
print 'Done!'