summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-12-14 19:05:44 (GMT)
committerEvan Martin <martine@danga.com>2012-12-14 19:05:44 (GMT)
commit62620a074ab50bcd3eb6e9ffb57dffa0f41efa14 (patch)
tree60ba386ff3fd530538643f536081829dd980144c
parent7088f7c2b10f6ff60c36625e04ff2f1b90fa6df3 (diff)
parentf5129c8174a85b8f4abd2fedd219980b1f760410 (diff)
downloadNinja-62620a074ab50bcd3eb6e9ffb57dffa0f41efa14.zip
Ninja-62620a074ab50bcd3eb6e9ffb57dffa0f41efa14.tar.gz
Ninja-62620a074ab50bcd3eb6e9ffb57dffa0f41efa14.tar.bz2
Merge pull request #472 from riannucci/add_python_pool_syntax
Add python ninja_syntax.py support for pool
-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: