Merge pull request #285 from nico/winninjatest

Make it possible to write `ninja ninja_test` on windows (as opposed to `ninja ninja_test.exe`). Also `ninja ninja`.
This commit is contained in:
Evan Martin 2012-04-30 09:22:19 -07:00
commit a40480745a

View File

@ -246,6 +246,8 @@ n.comment('Main executable is library plus main() function.')
objs = cxx('ninja')
ninja = n.build(binary('ninja'), 'link', objs, implicit=ninja_lib,
variables=[('libs', libs)])
if ninja != 'ninja':
n.build('ninja', 'phony', ninja)
n.newline()
all_targets += ninja
@ -298,9 +300,12 @@ if platform != 'mingw' and platform != 'windows':
ninja_test = n.build(binary('ninja_test'), 'link', objs, implicit=ninja_lib,
variables=[('ldflags', test_ldflags),
('libs', test_libs)])
if ninja_test != 'ninja_test':
n.build('ninja_test', 'phony', ninja_test)
n.newline()
all_targets += ninja_test
n.comment('Perftest executable.')
objs = cxx('parser_perftest')
parser_perftest = n.build(binary('parser_perftest'), 'link', objs,