OILS / asdl / NINJA_subgraph.py View on Github | oilshell.org

56 lines, 36 significant
1"""
2asdl/NINJA_subgraph.py
3"""
4
5from __future__ import print_function
6
7from build.ninja_lib import log
8from build import ninja_lib
9
10_ = log
11
12
13def NinjaGraph(ru):
14 n = ru.n
15
16 ru.comment('Generated by %s' % __name__)
17
18 n.rule(
19 'asdl-cpp',
20 command=
21 '_bin/shwrap/asdl_main $action $asdl_flags $in $out_prefix $debug_mod',
22 description='asdl_main $action $asdl_flags $in $out_prefix $debug_mod')
23 n.newline()
24
25 ru.py_binary('asdl/asdl_main.py')
26
27 # Base type for pretty printing
28 ru.asdl_library('asdl/hnode.asdl', pretty_print_methods=False)
29
30 # ASDL schemas
31 ru.asdl_library('asdl/examples/typed_arith.asdl')
32
33 ru.asdl_library('asdl/examples/shared_variant.asdl')
34
35 ru.asdl_library('asdl/examples/demo_lib.asdl')
36
37 ru.asdl_library('asdl/examples/typed_demo.asdl',
38 deps=['//asdl/examples/demo_lib.asdl'])
39
40 ru.cc_binary('asdl/gen_cpp_test.cc',
41 deps=[
42 '//asdl/examples/typed_arith.asdl',
43 '//asdl/examples/typed_demo.asdl',
44 '//asdl/examples/shared_variant.asdl',
45 '//mycpp/runtime',
46 '//prebuilt/asdl/runtime.mycpp',
47 ],
48 matrix=ninja_lib.COMPILERS_VARIANTS)
49
50 ru.cc_binary('asdl/gc_test.cc',
51 deps=[
52 '//asdl/examples/typed_demo.asdl',
53 '//mycpp/runtime',
54 '//prebuilt/asdl/runtime.mycpp',
55 ],
56 matrix=ninja_lib.COMPILERS_VARIANTS)