| 1 | """ | 
| 2 | osh/NINJA_subgraph.py | 
| 3 | """ | 
| 4 |  | 
| 5 | from __future__ import print_function | 
| 6 |  | 
| 7 | from build.ninja_lib import log | 
| 8 |  | 
| 9 | _ = log | 
| 10 |  | 
| 11 |  | 
| 12 | def NinjaGraph(ru): | 
| 13 | n = ru.n | 
| 14 |  | 
| 15 | ru.comment('Generated by %s' % __name__) | 
| 16 |  | 
| 17 | n.rule( | 
| 18 | 'arith-parse-gen', | 
| 19 | # uses shell style | 
| 20 | command='_bin/shwrap/arith_parse_gen > $out', | 
| 21 | description='arith-parse-gen > $out') | 
| 22 |  | 
| 23 | ru.py_binary('osh/arith_parse_gen.py') | 
| 24 |  | 
| 25 | n.build(['_gen/osh/arith_parse.cc'], | 
| 26 | 'arith-parse-gen', [], | 
| 27 | implicit=['_bin/shwrap/arith_parse_gen']) | 
| 28 | n.newline() | 
| 29 |  | 
| 30 | ru.cc_library('//osh/arith_parse', | 
| 31 | srcs=['_gen/osh/arith_parse.cc'], | 
| 32 | deps=['//cpp/osh']) |