2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "blueprint",
|
|
|
|
deps: [
|
2015-01-23 23:24:17 +01:00
|
|
|
"blueprint-parser",
|
2015-04-01 05:39:02 +02:00
|
|
|
"blueprint-pathtools",
|
2015-01-23 23:24:17 +01:00
|
|
|
"blueprint-proptools",
|
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
pkgPath: "github.com/google/blueprint",
|
|
|
|
srcs: [
|
2015-01-23 23:24:17 +01:00
|
|
|
"context.go",
|
2016-11-01 19:10:51 +01:00
|
|
|
"glob.go",
|
2015-01-23 23:24:17 +01:00
|
|
|
"live_tracker.go",
|
|
|
|
"mangle.go",
|
|
|
|
"module_ctx.go",
|
2017-11-11 00:12:08 +01:00
|
|
|
"name_interface.go",
|
2015-01-23 23:24:17 +01:00
|
|
|
"ninja_defs.go",
|
|
|
|
"ninja_strings.go",
|
|
|
|
"ninja_writer.go",
|
|
|
|
"package_ctx.go",
|
|
|
|
"scope.go",
|
|
|
|
"singleton_ctx.go",
|
|
|
|
"unpack.go",
|
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
testSrcs: [
|
2015-06-24 02:21:00 +02:00
|
|
|
"context_test.go",
|
2018-02-23 20:09:18 +01:00
|
|
|
"glob_test.go",
|
2015-06-24 02:21:00 +02:00
|
|
|
"ninja_strings_test.go",
|
|
|
|
"ninja_writer_test.go",
|
|
|
|
"splice_modules_test.go",
|
|
|
|
"unpack_test.go",
|
2017-10-20 00:30:06 +02:00
|
|
|
"visit_test.go",
|
2015-06-24 02:21:00 +02:00
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
}
|
2014-05-28 01:34:41 +02:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "blueprint-parser",
|
|
|
|
pkgPath: "github.com/google/blueprint/parser",
|
|
|
|
srcs: [
|
2016-06-07 21:28:16 +02:00
|
|
|
"parser/ast.go",
|
2015-01-23 23:24:17 +01:00
|
|
|
"parser/modify.go",
|
|
|
|
"parser/parser.go",
|
|
|
|
"parser/printer.go",
|
|
|
|
"parser/sort.go",
|
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
testSrcs: [
|
2018-03-22 02:10:01 +01:00
|
|
|
"parser/modify_test.go",
|
2015-06-24 02:21:00 +02:00
|
|
|
"parser/parser_test.go",
|
|
|
|
"parser/printer_test.go",
|
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
}
|
2014-05-28 01:34:41 +02:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "blueprint-deptools",
|
|
|
|
pkgPath: "github.com/google/blueprint/deptools",
|
|
|
|
srcs: ["deptools/depfile.go"],
|
|
|
|
}
|
2014-10-14 10:30:17 +02:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "blueprint-pathtools",
|
|
|
|
pkgPath: "github.com/google/blueprint/pathtools",
|
|
|
|
deps: [
|
2016-11-01 19:10:51 +01:00
|
|
|
"blueprint-deptools",
|
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
srcs: [
|
2015-01-23 23:24:17 +01:00
|
|
|
"pathtools/lists.go",
|
2017-02-01 22:21:35 +01:00
|
|
|
"pathtools/fs.go",
|
2015-01-23 23:24:17 +01:00
|
|
|
"pathtools/glob.go",
|
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
testSrcs: [
|
2018-09-21 06:48:44 +02:00
|
|
|
"pathtools/fs_test.go",
|
2015-06-24 02:21:00 +02:00
|
|
|
"pathtools/glob_test.go",
|
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
}
|
2014-06-06 23:37:07 +02:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "blueprint-proptools",
|
|
|
|
pkgPath: "github.com/google/blueprint/proptools",
|
|
|
|
srcs: [
|
2015-10-30 21:19:14 +01:00
|
|
|
"proptools/clone.go",
|
2016-09-29 22:19:34 +02:00
|
|
|
"proptools/escape.go",
|
2015-10-28 02:15:15 +01:00
|
|
|
"proptools/extend.go",
|
|
|
|
"proptools/proptools.go",
|
2015-11-02 23:58:10 +01:00
|
|
|
"proptools/typeequal.go",
|
2015-10-28 02:15:15 +01:00
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
testSrcs: [
|
2015-10-30 19:42:57 +01:00
|
|
|
"proptools/clone_test.go",
|
2016-09-29 22:19:34 +02:00
|
|
|
"proptools/escape_test.go",
|
2015-10-28 02:15:15 +01:00
|
|
|
"proptools/extend_test.go",
|
2015-11-02 23:58:10 +01:00
|
|
|
"proptools/typeequal_test.go",
|
2015-10-28 02:15:15 +01:00
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
}
|
2014-10-03 03:36:13 +02:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "blueprint-bootstrap",
|
|
|
|
deps: [
|
2015-01-23 23:24:17 +01:00
|
|
|
"blueprint",
|
|
|
|
"blueprint-deptools",
|
|
|
|
"blueprint-pathtools",
|
2015-05-13 23:36:24 +02:00
|
|
|
"blueprint-bootstrap-bpdoc",
|
2015-01-23 23:24:17 +01:00
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
pkgPath: "github.com/google/blueprint/bootstrap",
|
|
|
|
srcs: [
|
2015-01-23 23:24:17 +01:00
|
|
|
"bootstrap/bootstrap.go",
|
|
|
|
"bootstrap/cleanup.go",
|
|
|
|
"bootstrap/command.go",
|
|
|
|
"bootstrap/config.go",
|
|
|
|
"bootstrap/doc.go",
|
2016-11-01 19:10:51 +01:00
|
|
|
"bootstrap/glob.go",
|
2015-05-13 23:36:24 +02:00
|
|
|
"bootstrap/writedocs.go",
|
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
}
|
2015-05-13 23:36:24 +02:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "blueprint-bootstrap-bpdoc",
|
|
|
|
deps: [
|
2015-05-13 23:36:24 +02:00
|
|
|
"blueprint",
|
|
|
|
"blueprint-proptools",
|
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
pkgPath: "github.com/google/blueprint/bootstrap/bpdoc",
|
|
|
|
srcs: [
|
2015-05-13 23:36:24 +02:00
|
|
|
"bootstrap/bpdoc/bpdoc.go",
|
2019-02-07 01:20:17 +01:00
|
|
|
"bootstrap/bpdoc/properties.go",
|
|
|
|
"bootstrap/bpdoc/reader.go",
|
|
|
|
],
|
|
|
|
testSrcs: [
|
|
|
|
"bootstrap/bpdoc/reader_test.go",
|
2015-01-23 23:24:17 +01:00
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
}
|
2014-05-28 01:34:41 +02:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_binary {
|
|
|
|
name: "minibp",
|
|
|
|
deps: [
|
2015-01-23 23:24:17 +01:00
|
|
|
"blueprint",
|
|
|
|
"blueprint-bootstrap",
|
2017-07-13 02:04:33 +02:00
|
|
|
"gotestmain-tests",
|
2015-01-23 23:24:17 +01:00
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
srcs: ["bootstrap/minibp/main.go"],
|
|
|
|
}
|
2015-01-09 04:35:10 +01:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_binary {
|
|
|
|
name: "bpglob",
|
|
|
|
deps: ["blueprint-pathtools"],
|
|
|
|
srcs: ["bootstrap/bpglob/bpglob.go"],
|
|
|
|
}
|
2016-11-01 19:10:51 +01:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
blueprint_go_binary {
|
|
|
|
name: "bpfmt",
|
|
|
|
deps: ["blueprint-parser"],
|
|
|
|
srcs: ["bpfmt/bpfmt.go"],
|
|
|
|
}
|
2015-01-13 02:43:04 +01:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
blueprint_go_binary {
|
|
|
|
name: "bpmodify",
|
|
|
|
deps: ["blueprint-parser"],
|
|
|
|
srcs: ["bpmodify/bpmodify.go"],
|
|
|
|
}
|
2015-06-24 02:21:00 +02:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_binary {
|
|
|
|
name: "gotestmain",
|
|
|
|
srcs: ["gotestmain/gotestmain.go"],
|
|
|
|
}
|
Enhance bootstrap stage selection
This simplifies the bootstrap process while making it more flexible by
moving the stage selection into a go binary(choosestage). It will now be
possible to have more than two build stages.
Now each stage has a ninja template(main.ninja.in) and a timestamp
file(main.ninja.in.timestamp). The timestamp file may be updated by any
build stage that wishes to regenerate the ninja template. If the
choosestage binaries sees that the timestamp is newer than the template,
it will choose the prior stage.
The main stage no longer writes to the source tree to update the
build.ninja.in file. This was a problem for read-only source trees.
Instead, the choosestage binary first checks to see if that file is
newer than the last bootstrap.ninja.in, copies it in place, and starts
the boostrap stage.
The bootstrap stage regenerates it's own ninja template, but that
required a loop through the main stage to actually run it. The
choosestage binary now detects if the template has changed for the
current stage, and will restart the stage.
One change is that if dependencies do get messed up, instead of silently
failing, there's a higher chance that the bootstrap step will just
continue looping, doing nothing. This can happen if the main stage
has a dependency that triggers the bootstrap stage, but the bootstrap
stage doesn't see anything required to rebuild the main ninja file. A
side effect of this requirement is that changes to test code will now
rebuild the main ninja file.
Change-Id: I9965cfba79dc0dbbd3af05f5944f7653054455a2
2015-07-23 02:05:59 +02:00
|
|
|
|
2017-07-13 02:04:33 +02:00
|
|
|
// gotestmain tests can't be on the gotestmain module because it is an implicit dependency of tests.
|
|
|
|
// Put the tests in their own package and make it a dependency of minibp to make sure they run.
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "gotestmain-tests",
|
|
|
|
pkgPath: "github.com/google/blueprint/gotestmain",
|
|
|
|
srcs: [
|
2017-07-13 02:04:33 +02:00
|
|
|
"gotestmain/dummy.go",
|
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
testSrcs: [
|
2017-07-13 02:04:33 +02:00
|
|
|
"gotestmain/testmain_test.go",
|
|
|
|
],
|
2017-10-20 00:30:06 +02:00
|
|
|
}
|
2017-07-13 02:04:33 +02:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_binary {
|
|
|
|
name: "gotestrunner",
|
|
|
|
srcs: ["gotestrunner/gotestrunner.go"],
|
|
|
|
}
|
2015-09-18 05:59:51 +02:00
|
|
|
|
2017-10-20 00:30:06 +02:00
|
|
|
bootstrap_go_binary {
|
|
|
|
name: "loadplugins",
|
|
|
|
srcs: ["loadplugins/loadplugins.go"],
|
2015-07-25 01:53:27 +02:00
|
|
|
}
|
2017-07-19 04:37:37 +02:00
|
|
|
|
|
|
|
blueprint_go_binary {
|
|
|
|
name: "microfactory",
|
2017-08-08 22:14:40 +02:00
|
|
|
deps: ["blueprint-microfactory"],
|
|
|
|
srcs: ["microfactory/main/main.go"],
|
|
|
|
}
|
|
|
|
|
|
|
|
bootstrap_go_package {
|
|
|
|
name: "blueprint-microfactory",
|
|
|
|
pkgPath: "github.com/google/blueprint/microfactory",
|
2017-07-19 04:37:37 +02:00
|
|
|
srcs: ["microfactory/microfactory.go"],
|
|
|
|
testSrcs: ["microfactory/microfactory_test.go"],
|
|
|
|
}
|