1bootstrap_go_package {
2    name: "blueprint",
3    deps: [
4        "blueprint-parser",
5        "blueprint-pathtools",
6        "blueprint-proptools",
7    ],
8    pkgPath: "github.com/google/blueprint",
9    srcs: [
10        "context.go",
11        "glob.go",
12        "live_tracker.go",
13        "mangle.go",
14        "module_ctx.go",
15        "name_interface.go",
16        "ninja_defs.go",
17        "ninja_strings.go",
18        "ninja_writer.go",
19        "package_ctx.go",
20        "scope.go",
21        "singleton_ctx.go",
22    ],
23    testSrcs: [
24        "context_test.go",
25        "glob_test.go",
26        "module_ctx_test.go",
27        "ninja_strings_test.go",
28        "ninja_writer_test.go",
29        "splice_modules_test.go",
30        "visit_test.go",
31    ],
32}
33
34bootstrap_go_package {
35    name: "blueprint-parser",
36    pkgPath: "github.com/google/blueprint/parser",
37    srcs: [
38        "parser/ast.go",
39        "parser/modify.go",
40        "parser/parser.go",
41        "parser/printer.go",
42        "parser/sort.go",
43    ],
44    testSrcs: [
45        "parser/modify_test.go",
46        "parser/parser_test.go",
47        "parser/printer_test.go",
48    ],
49}
50
51bootstrap_go_package {
52    name: "blueprint-deptools",
53    pkgPath: "github.com/google/blueprint/deptools",
54    srcs: ["deptools/depfile.go"],
55}
56
57bootstrap_go_package {
58    name: "blueprint-pathtools",
59    pkgPath: "github.com/google/blueprint/pathtools",
60    deps: [
61        "blueprint-deptools",
62    ],
63    srcs: [
64        "pathtools/lists.go",
65        "pathtools/fs.go",
66        "pathtools/glob.go",
67    ],
68    testSrcs: [
69        "pathtools/fs_test.go",
70        "pathtools/glob_test.go",
71    ],
72}
73
74bootstrap_go_package {
75    name: "blueprint-proptools",
76    pkgPath: "github.com/google/blueprint/proptools",
77    deps: [
78        "blueprint-parser",
79    ],
80    srcs: [
81        "proptools/clone.go",
82        "proptools/escape.go",
83        "proptools/extend.go",
84        "proptools/filter.go",
85        "proptools/proptools.go",
86        "proptools/tag.go",
87        "proptools/typeequal.go",
88        "proptools/unpack.go",
89    ],
90    testSrcs: [
91        "proptools/clone_test.go",
92        "proptools/escape_test.go",
93        "proptools/extend_test.go",
94        "proptools/filter_test.go",
95        "proptools/tag_test.go",
96        "proptools/typeequal_test.go",
97        "proptools/unpack_test.go",
98    ],
99}
100
101bootstrap_go_package {
102    name: "blueprint-bootstrap",
103    deps: [
104        "blueprint",
105        "blueprint-deptools",
106        "blueprint-pathtools",
107        "blueprint-bootstrap-bpdoc",
108    ],
109    pkgPath: "github.com/google/blueprint/bootstrap",
110    srcs: [
111        "bootstrap/bootstrap.go",
112        "bootstrap/cleanup.go",
113        "bootstrap/command.go",
114        "bootstrap/config.go",
115        "bootstrap/doc.go",
116        "bootstrap/glob.go",
117        "bootstrap/writedocs.go",
118    ],
119}
120
121bootstrap_go_package {
122    name: "blueprint-bootstrap-bpdoc",
123    deps: [
124        "blueprint",
125        "blueprint-proptools",
126    ],
127    pkgPath: "github.com/google/blueprint/bootstrap/bpdoc",
128    srcs: [
129        "bootstrap/bpdoc/bpdoc.go",
130        "bootstrap/bpdoc/properties.go",
131        "bootstrap/bpdoc/reader.go",
132    ],
133    testSrcs: [
134        "bootstrap/bpdoc/bpdoc_test.go",
135        "bootstrap/bpdoc/properties_test.go",
136        "bootstrap/bpdoc/reader_test.go",
137    ],
138}
139
140bootstrap_go_binary {
141    name: "minibp",
142    deps: [
143        "blueprint",
144        "blueprint-bootstrap",
145        "gotestmain-tests",
146    ],
147    srcs: ["bootstrap/minibp/main.go"],
148}
149
150bootstrap_go_binary {
151    name: "bpglob",
152    deps: ["blueprint-pathtools"],
153    srcs: ["bootstrap/bpglob/bpglob.go"],
154}
155
156blueprint_go_binary {
157    name: "bpfmt",
158    deps: ["blueprint-parser"],
159    srcs: ["bpfmt/bpfmt.go"],
160}
161
162blueprint_go_binary {
163    name: "bpmodify",
164    deps: ["blueprint-parser"],
165    srcs: ["bpmodify/bpmodify.go"],
166}
167
168bootstrap_go_binary {
169    name: "gotestmain",
170    srcs: ["gotestmain/gotestmain.go"],
171}
172
173// gotestmain tests can't be on the gotestmain module because it is an implicit dependency of tests.
174// Put the tests in their own package and make it a dependency of minibp to make sure they run.
175bootstrap_go_package {
176    name: "gotestmain-tests",
177    pkgPath: "github.com/google/blueprint/gotestmain",
178    srcs: [
179        "gotestmain/dummy.go",
180    ],
181    testSrcs: [
182        "gotestmain/testmain_test.go",
183    ],
184}
185
186bootstrap_go_binary {
187    name: "gotestrunner",
188    srcs: ["gotestrunner/gotestrunner.go"],
189}
190
191bootstrap_go_binary {
192    name: "loadplugins",
193    srcs: ["loadplugins/loadplugins.go"],
194}
195
196blueprint_go_binary {
197    name: "microfactory",
198    deps: ["blueprint-microfactory"],
199    srcs: ["microfactory/main/main.go"],
200}
201
202bootstrap_go_package {
203    name: "blueprint-microfactory",
204    pkgPath: "github.com/google/blueprint/microfactory",
205    srcs: ["microfactory/microfactory.go"],
206    testSrcs: ["microfactory/microfactory_test.go"],
207}
208