platform_build_blueprint/Blueprints

162 lines
3.5 KiB
Text
Raw Normal View History

bootstrap_go_package(
name = "blueprint",
deps = [
"blueprint-parser",
"blueprint-pathtools",
"blueprint-proptools",
],
2015-03-21 03:39:29 +01:00
pkgPath = "github.com/google/blueprint",
srcs = [
"context.go",
"glob.go",
"live_tracker.go",
"mangle.go",
"module_ctx.go",
"ninja_defs.go",
"ninja_strings.go",
"ninja_writer.go",
"package_ctx.go",
"scope.go",
"singleton_ctx.go",
"unpack.go",
],
testSrcs = [
"context_test.go",
"ninja_strings_test.go",
"ninja_writer_test.go",
"splice_modules_test.go",
"unpack_test.go",
"visit_test.go",
],
)
bootstrap_go_package(
name = "blueprint-parser",
2015-03-21 03:39:29 +01:00
pkgPath = "github.com/google/blueprint/parser",
srcs = [
"parser/ast.go",
"parser/modify.go",
"parser/parser.go",
"parser/printer.go",
"parser/sort.go",
],
testSrcs = [
"parser/parser_test.go",
"parser/printer_test.go",
],
)
bootstrap_go_package(
name = "blueprint-deptools",
2015-03-21 03:39:29 +01:00
pkgPath = "github.com/google/blueprint/deptools",
srcs = ["deptools/depfile.go"],
)
bootstrap_go_package(
name = "blueprint-pathtools",
2015-03-21 03:39:29 +01:00
pkgPath = "github.com/google/blueprint/pathtools",
deps = [
"blueprint-deptools",
],
srcs = [
"pathtools/lists.go",
"pathtools/fs.go",
"pathtools/glob.go",
],
testSrcs = [
"pathtools/glob_test.go",
],
)
bootstrap_go_package(
name = "blueprint-proptools",
2015-03-21 03:39:29 +01:00
pkgPath = "github.com/google/blueprint/proptools",
srcs = [
"proptools/clone.go",
"proptools/escape.go",
"proptools/extend.go",
"proptools/proptools.go",
"proptools/typeequal.go",
],
testSrcs = [
"proptools/clone_test.go",
"proptools/escape_test.go",
"proptools/extend_test.go",
"proptools/typeequal_test.go",
],
)
bootstrap_go_package(
name = "blueprint-bootstrap",
deps = [
"blueprint",
"blueprint-deptools",
"blueprint-pathtools",
"blueprint-bootstrap-bpdoc",
],
2015-03-21 03:39:29 +01:00
pkgPath = "github.com/google/blueprint/bootstrap",
srcs = [
"bootstrap/bootstrap.go",
"bootstrap/cleanup.go",
"bootstrap/command.go",
"bootstrap/config.go",
"bootstrap/doc.go",
"bootstrap/glob.go",
"bootstrap/writedocs.go",
],
)
bootstrap_go_package(
name = "blueprint-bootstrap-bpdoc",
deps = [
"blueprint",
"blueprint-proptools",
],
pkgPath = "github.com/google/blueprint/bootstrap/bpdoc",
srcs = [
"bootstrap/bpdoc/bpdoc.go",
],
)
bootstrap_core_go_binary(
name = "minibp",
deps = [
"blueprint",
"blueprint-bootstrap",
],
srcs = ["bootstrap/minibp/main.go"],
)
bootstrap_core_go_binary(
name = "bpglob",
deps = ["blueprint-pathtools"],
srcs = ["bootstrap/bpglob/bpglob.go"],
)
blueprint_go_binary(
name = "bpfmt",
deps = ["blueprint-parser"],
srcs = ["bpfmt/bpfmt.go"],
)
blueprint_go_binary(
name = "bpmodify",
deps = ["blueprint-parser"],
srcs = ["bpmodify/bpmodify.go"],
)
bootstrap_core_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
bootstrap_core_go_binary(
name = "gotestrunner",
srcs = ["gotestrunner/gotestrunner.go"],
)
bootstrap_go_binary{
name = "loadplugins",
srcs = ["loadplugins/loadplugins.go"],
}