diff options
author | Kareem Khazem <karkhaz@karkhaz.com> | 2018-02-20 18:51:01 (GMT) |
---|---|---|
committer | Kareem Khazem <karkhaz@karkhaz.com> | 2018-02-20 18:51:01 (GMT) |
commit | 85fab32362e2afe3c58dde00ca36676c9e29a9a6 (patch) | |
tree | 2ae5b1875ca302b98979b26817394454d7560aba /misc | |
parent | e234a7bdb6c42f4539c0ab09b624f191287c2c10 (diff) | |
download | Ninja-85fab32362e2afe3c58dde00ca36676c9e29a9a6.zip Ninja-85fab32362e2afe3c58dde00ca36676c9e29a9a6.tar.gz Ninja-85fab32362e2afe3c58dde00ca36676c9e29a9a6.tar.bz2 |
Support pool for Writer.build() in ninja_syntax.py
ninja_syntax.py now supports a pool being specified for individual
builds, as well as rules.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ninja_syntax.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/ninja_syntax.py b/misc/ninja_syntax.py index 5c52ea2..051bac1 100644 --- a/misc/ninja_syntax.py +++ b/misc/ninja_syntax.py @@ -60,7 +60,7 @@ class Writer(object): self.variable('deps', deps, indent=1) def build(self, outputs, rule, inputs=None, implicit=None, order_only=None, - variables=None, implicit_outputs=None): + variables=None, implicit_outputs=None, pool=None): outputs = as_list(outputs) out_outputs = [escape_path(x) for x in outputs] all_inputs = [escape_path(x) for x in as_list(inputs)] @@ -81,6 +81,8 @@ class Writer(object): self._line('build %s: %s' % (' '.join(out_outputs), ' '.join([rule] + all_inputs))) + if pool is not None: + self._line(' pool = %s' % pool) if variables: if isinstance(variables, dict): |