summaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-12-28 03:39:16 (GMT)
committerEvan Martin <martine@danga.com>2011-12-28 03:39:16 (GMT)
commitc6a0c1ed9b64eb2a7f49c855f27a164cb651bd87 (patch)
tree98fad7e451e2723dbe255b08df5bbfde600ef3b9 /configure.py
parent69cc5ea260ecf4096dba8416f5f50c0ab14ff01d (diff)
downloadNinja-c6a0c1ed9b64eb2a7f49c855f27a164cb651bd87.zip
Ninja-c6a0c1ed9b64eb2a7f49c855f27a164cb651bd87.tar.gz
Ninja-c6a0c1ed9b64eb2a7f49c855f27a164cb651bd87.tar.bz2
add an "all" target to build all binaries
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/configure.py b/configure.py
index 2e044c1..b2eed2a 100755
--- a/configure.py
+++ b/configure.py
@@ -182,11 +182,14 @@ n.newline()
libs.append('-lninja')
+all_targets = []
+
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)])
n.newline()
+all_targets += ninja
n.comment('Tests all build into ninja_test executable.')
@@ -227,16 +230,19 @@ for name in ['build_log_test',
if platform != 'mingw':
test_libs.append('-lpthread')
-n.build(binary('ninja_test'), 'link', objs, implicit=ninja_lib,
- variables=[('ldflags', test_ldflags),
- ('libs', test_libs)])
+ninja_test = n.build(binary('ninja_test'), 'link', objs, implicit=ninja_lib,
+ variables=[('ldflags', test_ldflags),
+ ('libs', test_libs)])
n.newline()
+all_targets += ninja_test
n.comment('Perftest executable.')
objs = cxx('parser_perftest')
-n.build(binary('parser_perftest'), 'link', objs, implicit=ninja_lib,
- variables=[('libs', '-L$builddir -lninja')])
+parser_perftest = n.build(binary('parser_perftest'), 'link', objs,
+ implicit=ninja_lib,
+ variables=[('libs', '-L$builddir -lninja')])
n.newline()
+all_targets += parser_perftest
n.comment('Generate a graph using the "graph" tool.')
n.rule('gendot',
@@ -283,5 +289,8 @@ if host != 'mingw':
n.comment('Build only the main binary by default.')
n.default(ninja)
+n.newline()
+
+n.build('all', 'phony', all_targets)
print 'wrote %s.' % BUILD_FILENAME