1package {
2    default_applicable_licenses: ["build_blueprint_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18// See: http://go/android-license-faq
19license {
20    name: "build_blueprint_license",
21    visibility: [":__subpackages__"],
22    license_kinds: [
23        "SPDX-license-identifier-Apache-2.0",
24        "SPDX-license-identifier-BSD",
25    ],
26    license_text: [
27        "LICENSE",
28    ],
29}
30
31bootstrap_go_package {
32    name: "blueprint",
33    deps: [
34        "blueprint-metrics",
35        "blueprint-parser",
36        "blueprint-pathtools",
37        "blueprint-proptools",
38    ],
39    pkgPath: "github.com/google/blueprint",
40    srcs: [
41        "context.go",
42        "levenshtein.go",
43        "glob.go",
44        "live_tracker.go",
45        "mangle.go",
46        "module_ctx.go",
47        "name_interface.go",
48        "ninja_defs.go",
49        "ninja_strings.go",
50        "ninja_writer.go",
51        "package_ctx.go",
52        "provider.go",
53        "scope.go",
54        "singleton_ctx.go",
55        "source_file_provider.go",
56        "transition.go",
57    ],
58    testSrcs: [
59        "context_test.go",
60        "levenshtein_test.go",
61        "glob_test.go",
62        "module_ctx_test.go",
63        "ninja_strings_test.go",
64        "ninja_writer_test.go",
65        "provider_test.go",
66        "splice_modules_test.go",
67        "transition_test.go",
68        "visit_test.go",
69    ],
70}
71
72bootstrap_go_package {
73    name: "blueprint-parser",
74    pkgPath: "github.com/google/blueprint/parser",
75    srcs: [
76        "parser/ast.go",
77        "parser/modify.go",
78        "parser/parser.go",
79        "parser/printer.go",
80        "parser/sort.go",
81    ],
82    testSrcs: [
83        "parser/modify_test.go",
84        "parser/parser_test.go",
85        "parser/printer_test.go",
86        "parser/sort_test.go",
87    ],
88}
89
90bootstrap_go_package {
91    name: "blueprint-deptools",
92    pkgPath: "github.com/google/blueprint/deptools",
93    srcs: ["deptools/depfile.go"],
94}
95
96bootstrap_go_package {
97    name: "blueprint-pathtools",
98    pkgPath: "github.com/google/blueprint/pathtools",
99    deps: [
100        "blueprint-deptools",
101    ],
102    srcs: [
103        "pathtools/lists.go",
104        "pathtools/fs.go",
105        "pathtools/glob.go",
106    ],
107    testSrcs: [
108        "pathtools/fs_test.go",
109        "pathtools/glob_test.go",
110        "pathtools/lists_test.go",
111    ],
112}
113
114bootstrap_go_package {
115    name: "blueprint-proptools",
116    pkgPath: "github.com/google/blueprint/proptools",
117    deps: [
118        "blueprint-parser",
119        "blueprint-optional",
120    ],
121    srcs: [
122        "proptools/clone.go",
123        "proptools/configurable.go",
124        "proptools/escape.go",
125        "proptools/extend.go",
126        "proptools/filter.go",
127        "proptools/hash_provider.go",
128        "proptools/proptools.go",
129        "proptools/tag.go",
130        "proptools/typeequal.go",
131        "proptools/unpack.go",
132        "proptools/utils.go",
133    ],
134    testSrcs: [
135        "proptools/clone_test.go",
136        "proptools/escape_test.go",
137        "proptools/extend_test.go",
138        "proptools/filter_test.go",
139        "proptools/hash_provider_test.go",
140        "proptools/tag_test.go",
141        "proptools/typeequal_test.go",
142        "proptools/unpack_test.go",
143    ],
144}
145
146bootstrap_go_package {
147    name: "blueprint-optional",
148    pkgPath: "github.com/google/blueprint/optional",
149    srcs: [
150        "optional/optional.go",
151    ],
152}
153
154bootstrap_go_package {
155    name: "blueprint-bootstrap",
156    deps: [
157        "blueprint",
158        "blueprint-deptools",
159        "blueprint-pathtools",
160        "blueprint-bootstrap-bpdoc",
161    ],
162    pkgPath: "github.com/google/blueprint/bootstrap",
163    srcs: [
164        "bootstrap/bootstrap.go",
165        "bootstrap/command.go",
166        "bootstrap/config.go",
167        "bootstrap/glob.go",
168        "bootstrap/writedocs.go",
169    ],
170}
171
172bootstrap_go_package {
173    name: "blueprint-bootstrap-bpdoc",
174    deps: [
175        "blueprint",
176        "blueprint-proptools",
177    ],
178    pkgPath: "github.com/google/blueprint/bootstrap/bpdoc",
179    srcs: [
180        "bootstrap/bpdoc/bpdoc.go",
181        "bootstrap/bpdoc/properties.go",
182        "bootstrap/bpdoc/reader.go",
183    ],
184    testSrcs: [
185        "bootstrap/bpdoc/bpdoc_test.go",
186        "bootstrap/bpdoc/properties_test.go",
187        "bootstrap/bpdoc/reader_test.go",
188    ],
189}
190
191blueprint_go_binary {
192    name: "bpglob",
193    deps: ["blueprint-pathtools"],
194    srcs: ["bootstrap/bpglob/bpglob.go"],
195}
196
197blueprint_go_binary {
198    name: "bpfmt",
199    deps: ["blueprint-parser"],
200    srcs: ["bpfmt/bpfmt.go"],
201}
202
203blueprint_go_binary {
204    name: "bpmodify",
205    deps: [
206        "blueprint-parser",
207        "blueprint-proptools",
208    ],
209    srcs: ["bpmodify/bpmodify.go"],
210    testSrcs: ["bpmodify/bpmodify_test.go"],
211}
212
213blueprint_go_binary {
214    name: "gotestmain",
215    srcs: ["gotestmain/gotestmain.go"],
216}
217
218// gotestmain tests can't be on the gotestmain module because it is an implicit dependency of tests.
219// Put the tests in their own package and make it a dependency of minibp to make sure they run.
220bootstrap_go_package {
221    name: "gotestmain-tests",
222    pkgPath: "github.com/google/blueprint/gotestmain",
223    srcs: [
224        "gotestmain/dummy.go",
225    ],
226    testSrcs: [
227        "gotestmain/testmain_test.go",
228    ],
229}
230
231blueprint_go_binary {
232    name: "gotestrunner",
233    srcs: ["gotestrunner/gotestrunner.go"],
234}
235
236blueprint_go_binary {
237    name: "loadplugins",
238    srcs: ["loadplugins/loadplugins.go"],
239}
240
241blueprint_go_binary {
242    name: "microfactory",
243    deps: ["blueprint-microfactory"],
244    srcs: ["microfactory/main/main.go"],
245}
246
247bootstrap_go_package {
248    name: "blueprint-microfactory",
249    pkgPath: "github.com/google/blueprint/microfactory",
250    srcs: ["microfactory/microfactory.go"],
251    testSrcs: ["microfactory/microfactory_test.go"],
252}
253