Finish switching blueprint back to the original Blueprints format

An ill-fated experiment with using a format that was closer to
Bazel left Blueprint preferring the original style, but documenting
and using the new style.  Update the documentation and run bpfmt -w.

Test: builds
Change-Id: I3fb70c8fa50c332da01cf5912b179c60d1638814
This commit is contained in:
Colin Cross 2017-10-19 15:30:06 -07:00
parent 5029114553
commit 4a0fe087b1
3 changed files with 87 additions and 87 deletions

View file

@ -1,12 +1,12 @@
bootstrap_go_package( bootstrap_go_package {
name = "blueprint", name: "blueprint",
deps = [ deps: [
"blueprint-parser", "blueprint-parser",
"blueprint-pathtools", "blueprint-pathtools",
"blueprint-proptools", "blueprint-proptools",
], ],
pkgPath = "github.com/google/blueprint", pkgPath: "github.com/google/blueprint",
srcs = [ srcs: [
"context.go", "context.go",
"glob.go", "glob.go",
"live_tracker.go", "live_tracker.go",
@ -20,82 +20,82 @@ bootstrap_go_package(
"singleton_ctx.go", "singleton_ctx.go",
"unpack.go", "unpack.go",
], ],
testSrcs = [ testSrcs: [
"context_test.go", "context_test.go",
"ninja_strings_test.go", "ninja_strings_test.go",
"ninja_writer_test.go", "ninja_writer_test.go",
"splice_modules_test.go", "splice_modules_test.go",
"unpack_test.go", "unpack_test.go",
"visit_test.go", "visit_test.go",
], ],
) }
bootstrap_go_package( bootstrap_go_package {
name = "blueprint-parser", name: "blueprint-parser",
pkgPath = "github.com/google/blueprint/parser", pkgPath: "github.com/google/blueprint/parser",
srcs = [ srcs: [
"parser/ast.go", "parser/ast.go",
"parser/modify.go", "parser/modify.go",
"parser/parser.go", "parser/parser.go",
"parser/printer.go", "parser/printer.go",
"parser/sort.go", "parser/sort.go",
], ],
testSrcs = [ testSrcs: [
"parser/parser_test.go", "parser/parser_test.go",
"parser/printer_test.go", "parser/printer_test.go",
], ],
) }
bootstrap_go_package( bootstrap_go_package {
name = "blueprint-deptools", name: "blueprint-deptools",
pkgPath = "github.com/google/blueprint/deptools", pkgPath: "github.com/google/blueprint/deptools",
srcs = ["deptools/depfile.go"], srcs: ["deptools/depfile.go"],
) }
bootstrap_go_package( bootstrap_go_package {
name = "blueprint-pathtools", name: "blueprint-pathtools",
pkgPath = "github.com/google/blueprint/pathtools", pkgPath: "github.com/google/blueprint/pathtools",
deps = [ deps: [
"blueprint-deptools", "blueprint-deptools",
], ],
srcs = [ srcs: [
"pathtools/lists.go", "pathtools/lists.go",
"pathtools/fs.go", "pathtools/fs.go",
"pathtools/glob.go", "pathtools/glob.go",
], ],
testSrcs = [ testSrcs: [
"pathtools/glob_test.go", "pathtools/glob_test.go",
], ],
) }
bootstrap_go_package( bootstrap_go_package {
name = "blueprint-proptools", name: "blueprint-proptools",
pkgPath = "github.com/google/blueprint/proptools", pkgPath: "github.com/google/blueprint/proptools",
srcs = [ srcs: [
"proptools/clone.go", "proptools/clone.go",
"proptools/escape.go", "proptools/escape.go",
"proptools/extend.go", "proptools/extend.go",
"proptools/proptools.go", "proptools/proptools.go",
"proptools/typeequal.go", "proptools/typeequal.go",
], ],
testSrcs = [ testSrcs: [
"proptools/clone_test.go", "proptools/clone_test.go",
"proptools/escape_test.go", "proptools/escape_test.go",
"proptools/extend_test.go", "proptools/extend_test.go",
"proptools/typeequal_test.go", "proptools/typeequal_test.go",
], ],
) }
bootstrap_go_package( bootstrap_go_package {
name = "blueprint-bootstrap", name: "blueprint-bootstrap",
deps = [ deps: [
"blueprint", "blueprint",
"blueprint-deptools", "blueprint-deptools",
"blueprint-pathtools", "blueprint-pathtools",
"blueprint-bootstrap-bpdoc", "blueprint-bootstrap-bpdoc",
], ],
pkgPath = "github.com/google/blueprint/bootstrap", pkgPath: "github.com/google/blueprint/bootstrap",
srcs = [ srcs: [
"bootstrap/bootstrap.go", "bootstrap/bootstrap.go",
"bootstrap/cleanup.go", "bootstrap/cleanup.go",
"bootstrap/command.go", "bootstrap/command.go",
@ -104,74 +104,74 @@ bootstrap_go_package(
"bootstrap/glob.go", "bootstrap/glob.go",
"bootstrap/writedocs.go", "bootstrap/writedocs.go",
], ],
) }
bootstrap_go_package( bootstrap_go_package {
name = "blueprint-bootstrap-bpdoc", name: "blueprint-bootstrap-bpdoc",
deps = [ deps: [
"blueprint", "blueprint",
"blueprint-proptools", "blueprint-proptools",
], ],
pkgPath = "github.com/google/blueprint/bootstrap/bpdoc", pkgPath: "github.com/google/blueprint/bootstrap/bpdoc",
srcs = [ srcs: [
"bootstrap/bpdoc/bpdoc.go", "bootstrap/bpdoc/bpdoc.go",
], ],
) }
bootstrap_go_binary( bootstrap_go_binary {
name = "minibp", name: "minibp",
deps = [ deps: [
"blueprint", "blueprint",
"blueprint-bootstrap", "blueprint-bootstrap",
"gotestmain-tests", "gotestmain-tests",
], ],
srcs = ["bootstrap/minibp/main.go"], srcs: ["bootstrap/minibp/main.go"],
) }
bootstrap_go_binary( bootstrap_go_binary {
name = "bpglob", name: "bpglob",
deps = ["blueprint-pathtools"], deps: ["blueprint-pathtools"],
srcs = ["bootstrap/bpglob/bpglob.go"], srcs: ["bootstrap/bpglob/bpglob.go"],
) }
blueprint_go_binary( blueprint_go_binary {
name = "bpfmt", name: "bpfmt",
deps = ["blueprint-parser"], deps: ["blueprint-parser"],
srcs = ["bpfmt/bpfmt.go"], srcs: ["bpfmt/bpfmt.go"],
) }
blueprint_go_binary( blueprint_go_binary {
name = "bpmodify", name: "bpmodify",
deps = ["blueprint-parser"], deps: ["blueprint-parser"],
srcs = ["bpmodify/bpmodify.go"], srcs: ["bpmodify/bpmodify.go"],
) }
bootstrap_go_binary( bootstrap_go_binary {
name = "gotestmain", name: "gotestmain",
srcs = ["gotestmain/gotestmain.go"], srcs: ["gotestmain/gotestmain.go"],
) }
// gotestmain tests can't be on the gotestmain module because it is an implicit dependency of tests. // 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. // Put the tests in their own package and make it a dependency of minibp to make sure they run.
bootstrap_go_package( bootstrap_go_package {
name = "gotestmain-tests", name: "gotestmain-tests",
pkgPath = "github.com/google/blueprint/gotestmain", pkgPath: "github.com/google/blueprint/gotestmain",
srcs = [ srcs: [
"gotestmain/dummy.go", "gotestmain/dummy.go",
], ],
testSrcs = [ testSrcs: [
"gotestmain/testmain_test.go", "gotestmain/testmain_test.go",
], ],
) }
bootstrap_go_binary( bootstrap_go_binary {
name = "gotestrunner", name: "gotestrunner",
srcs = ["gotestrunner/gotestrunner.go"], srcs: ["gotestrunner/gotestrunner.go"],
) }
bootstrap_go_binary{ bootstrap_go_binary {
name = "loadplugins", name: "loadplugins",
srcs = ["loadplugins/loadplugins.go"], srcs: ["loadplugins/loadplugins.go"],
} }
blueprint_go_binary { blueprint_go_binary {

10
doc.go
View file

@ -35,15 +35,15 @@
// the module type looks like a function call, and the properties of the module // the module type looks like a function call, and the properties of the module
// look like optional arguments. For example, a simple module might look like: // look like optional arguments. For example, a simple module might look like:
// //
// cc_library( // cc_library {
// name = "cmd", // name: "cmd",
// srcs = [ // srcs: [
// "main.c", // "main.c",
// ], // ],
// deps = [ // deps: [
// "libc", // "libc",
// ], // ],
// ) // }
// //
// subdirs = ["subdir1", "subdir2"] // subdirs = ["subdir1", "subdir2"]
// //

View file

@ -1,3 +1,3 @@
// Root Blueprints file for test_tree // Root Blueprints file for test_tree
subdirs=["*"] subdirs = ["*"]