summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorRobert Iannucci <robbie@rail.com>2012-12-14 07:11:37 (GMT)
committerRobert Iannucci <robbie@rail.com>2012-12-14 07:11:48 (GMT)
commitf5129c8174a85b8f4abd2fedd219980b1f760410 (patch)
tree8a70ed242ac7e4f48fea9cf7f667aca9af34acf3 /misc
parent8fcc4caf8f98c532f0f5078b7a0593b0904871a0 (diff)
downloadNinja-f5129c8174a85b8f4abd2fedd219980b1f760410.zip
Ninja-f5129c8174a85b8f4abd2fedd219980b1f760410.tar.gz
Ninja-f5129c8174a85b8f4abd2fedd219980b1f760410.tar.bz2
Add python ninja_syntax.py support for pool
Diffstat (limited to 'misc')
-rw-r--r--misc/ninja_syntax.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/misc/ninja_syntax.py b/misc/ninja_syntax.py
index 3572dd9..b0a1561 100644
--- a/misc/ninja_syntax.py
+++ b/misc/ninja_syntax.py
@@ -32,8 +32,13 @@ class Writer(object):
value = ' '.join(filter(None, value)) # Filter out empty strings.
self._line('%s = %s' % (key, value), indent)
+ def pool(self, name, depth):
+ self._line('pool %s' % name)
+ self.variable('depth', depth, indent=1)
+
def rule(self, name, command, description=None, depfile=None,
- generator=False, restat=False, rspfile=None, rspfile_content=None):
+ generator=False, pool=None, restat=False, rspfile=None,
+ rspfile_content=None):
self._line('rule %s' % name)
self.variable('command', command, indent=1)
if description:
@@ -42,6 +47,8 @@ class Writer(object):
self.variable('depfile', depfile, indent=1)
if generator:
self.variable('generator', '1', indent=1)
+ if pool:
+ self.variable('pool', pool, indent=1)
if restat:
self.variable('restat', '1', indent=1)
if rspfile: