From 3e8e74f276eafaf709e8e4c4291431a1d4ccb7e2 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 23 Jan 2015 13:38:48 -0800 Subject: [PATCH] Move blueprint/* up a directory Make integrating with go tools easier by putting the blueprint package files in the top level directory of the git project instead of in a subdirectory called blueprint. Change-Id: I35c144c5fe7ddf34e478d0c47c50b2f6c92c2a03 --- Blueprints | 54 ++++----- .../bootstrap => bootstrap}/bootstrap.go | 0 {blueprint/bootstrap => bootstrap}/cleanup.go | 0 {blueprint/bootstrap => bootstrap}/command.go | 0 {blueprint/bootstrap => bootstrap}/config.go | 0 {blueprint/bootstrap => bootstrap}/doc.go | 0 .../bootstrap => bootstrap}/minibp/main.go | 0 {blueprint/bpfmt => bpfmt}/bpfmt.go | 0 {blueprint/bpmodify => bpmodify}/bpmodify.go | 0 build.ninja.in | 105 ++++++++++++------ blueprint/context.go => context.go | 0 blueprint/context_test.go => context_test.go | 0 {blueprint/deptools => deptools}/depfile.go | 0 blueprint/live_tracker.go => live_tracker.go | 0 blueprint/mangle.go => mangle.go | 0 blueprint/module_ctx.go => module_ctx.go | 0 blueprint/ninja_defs.go => ninja_defs.go | 0 .../ninja_strings.go => ninja_strings.go | 0 ...a_strings_test.go => ninja_strings_test.go | 0 blueprint/ninja_writer.go => ninja_writer.go | 0 ...nja_writer_test.go => ninja_writer_test.go | 0 blueprint/package_ctx.go => package_ctx.go | 0 {blueprint/parser => parser}/modify.go | 0 {blueprint/parser => parser}/parser.go | 0 {blueprint/parser => parser}/parser_test.go | 0 {blueprint/parser => parser}/printer.go | 0 {blueprint/parser => parser}/printer_test.go | 0 {blueprint/parser => parser}/sort.go | 0 {blueprint/pathtools => pathtools}/glob.go | 0 {blueprint/pathtools => pathtools}/lists.go | 0 .../proptools => proptools}/proptools.go | 0 blueprint/scope.go => scope.go | 0 .../singleton_ctx.go => singleton_ctx.go | 0 blueprint/unpack.go => unpack.go | 0 blueprint/unpack_test.go => unpack_test.go | 0 35 files changed, 98 insertions(+), 61 deletions(-) rename {blueprint/bootstrap => bootstrap}/bootstrap.go (100%) rename {blueprint/bootstrap => bootstrap}/cleanup.go (100%) rename {blueprint/bootstrap => bootstrap}/command.go (100%) rename {blueprint/bootstrap => bootstrap}/config.go (100%) rename {blueprint/bootstrap => bootstrap}/doc.go (100%) rename {blueprint/bootstrap => bootstrap}/minibp/main.go (100%) rename {blueprint/bpfmt => bpfmt}/bpfmt.go (100%) rename {blueprint/bpmodify => bpmodify}/bpmodify.go (100%) rename blueprint/context.go => context.go (100%) rename blueprint/context_test.go => context_test.go (100%) rename {blueprint/deptools => deptools}/depfile.go (100%) rename blueprint/live_tracker.go => live_tracker.go (100%) rename blueprint/mangle.go => mangle.go (100%) rename blueprint/module_ctx.go => module_ctx.go (100%) rename blueprint/ninja_defs.go => ninja_defs.go (100%) rename blueprint/ninja_strings.go => ninja_strings.go (100%) rename blueprint/ninja_strings_test.go => ninja_strings_test.go (100%) rename blueprint/ninja_writer.go => ninja_writer.go (100%) rename blueprint/ninja_writer_test.go => ninja_writer_test.go (100%) rename blueprint/package_ctx.go => package_ctx.go (100%) rename {blueprint/parser => parser}/modify.go (100%) rename {blueprint/parser => parser}/parser.go (100%) rename {blueprint/parser => parser}/parser_test.go (100%) rename {blueprint/parser => parser}/printer.go (100%) rename {blueprint/parser => parser}/printer_test.go (100%) rename {blueprint/parser => parser}/sort.go (100%) rename {blueprint/pathtools => pathtools}/glob.go (100%) rename {blueprint/pathtools => pathtools}/lists.go (100%) rename {blueprint/proptools => proptools}/proptools.go (100%) rename blueprint/scope.go => scope.go (100%) rename blueprint/singleton_ctx.go => singleton_ctx.go (100%) rename blueprint/unpack.go => unpack.go (100%) rename blueprint/unpack_test.go => unpack_test.go (100%) diff --git a/Blueprints b/Blueprints index fa85eda..823bdcb 100644 --- a/Blueprints +++ b/Blueprints @@ -3,45 +3,45 @@ bootstrap_go_package { deps: ["blueprint-parser", "blueprint-proptools"], pkgPath: "blueprint", - srcs: ["blueprint/context.go", - "blueprint/live_tracker.go", - "blueprint/mangle.go", - "blueprint/module_ctx.go", - "blueprint/ninja_defs.go", - "blueprint/ninja_strings.go", - "blueprint/ninja_writer.go", - "blueprint/package_ctx.go", - "blueprint/scope.go", - "blueprint/singleton_ctx.go", - "blueprint/unpack.go"], + srcs: ["context.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"], } bootstrap_go_package { name: "blueprint-parser", pkgPath: "blueprint/parser", - srcs: ["blueprint/parser/modify.go", - "blueprint/parser/parser.go", - "blueprint/parser/printer.go", - "blueprint/parser/sort.go"], + srcs: ["parser/modify.go", + "parser/parser.go", + "parser/printer.go", + "parser/sort.go"], } bootstrap_go_package { name: "blueprint-deptools", pkgPath: "blueprint/deptools", - srcs: ["blueprint/deptools/depfile.go"], + srcs: ["deptools/depfile.go"], } bootstrap_go_package { name: "blueprint-pathtools", pkgPath: "blueprint/pathtools", - srcs: ["blueprint/pathtools/lists.go", - "blueprint/pathtools/glob.go"], + srcs: ["pathtools/lists.go", + "pathtools/glob.go"], } bootstrap_go_package { name: "blueprint-proptools", pkgPath: "blueprint/proptools", - srcs: ["blueprint/proptools/proptools.go"], + srcs: ["proptools/proptools.go"], } bootstrap_go_package { @@ -50,27 +50,27 @@ bootstrap_go_package { "blueprint-deptools", "blueprint-pathtools"], pkgPath: "blueprint/bootstrap", - srcs: ["blueprint/bootstrap/bootstrap.go", - "blueprint/bootstrap/cleanup.go", - "blueprint/bootstrap/command.go", - "blueprint/bootstrap/config.go", - "blueprint/bootstrap/doc.go"], + srcs: ["bootstrap/bootstrap.go", + "bootstrap/cleanup.go", + "bootstrap/command.go", + "bootstrap/config.go", + "bootstrap/doc.go"], } bootstrap_go_binary { name: "minibp", deps: ["blueprint", "blueprint-bootstrap"], - srcs: ["blueprint/bootstrap/minibp/main.go"], + srcs: ["bootstrap/minibp/main.go"], } bootstrap_go_binary { name: "bpfmt", deps: ["blueprint-parser"], - srcs: ["blueprint/bpfmt/bpfmt.go"], + srcs: ["bpfmt/bpfmt.go"], } bootstrap_go_binary { name: "bpmodify", deps: ["blueprint-parser"], - srcs: ["blueprint/bpmodify/bpmodify.go"], + srcs: ["bpmodify/bpmodify.go"], } diff --git a/blueprint/bootstrap/bootstrap.go b/bootstrap/bootstrap.go similarity index 100% rename from blueprint/bootstrap/bootstrap.go rename to bootstrap/bootstrap.go diff --git a/blueprint/bootstrap/cleanup.go b/bootstrap/cleanup.go similarity index 100% rename from blueprint/bootstrap/cleanup.go rename to bootstrap/cleanup.go diff --git a/blueprint/bootstrap/command.go b/bootstrap/command.go similarity index 100% rename from blueprint/bootstrap/command.go rename to bootstrap/command.go diff --git a/blueprint/bootstrap/config.go b/bootstrap/config.go similarity index 100% rename from blueprint/bootstrap/config.go rename to bootstrap/config.go diff --git a/blueprint/bootstrap/doc.go b/bootstrap/doc.go similarity index 100% rename from blueprint/bootstrap/doc.go rename to bootstrap/doc.go diff --git a/blueprint/bootstrap/minibp/main.go b/bootstrap/minibp/main.go similarity index 100% rename from blueprint/bootstrap/minibp/main.go rename to bootstrap/minibp/main.go diff --git a/blueprint/bpfmt/bpfmt.go b/bpfmt/bpfmt.go similarity index 100% rename from blueprint/bpfmt/bpfmt.go rename to bpfmt/bpfmt.go diff --git a/blueprint/bpmodify/bpmodify.go b/bpmodify/bpmodify.go similarity index 100% rename from blueprint/bpmodify/bpmodify.go rename to bpmodify/bpmodify.go diff --git a/build.ninja.in b/build.ninja.in index 218e0ec..f073974 100644 --- a/build.ninja.in +++ b/build.ninja.in @@ -55,17 +55,14 @@ rule g.bootstrap.link # Defined: Blueprints:1:1 build .bootstrap/blueprint/pkg/blueprint.a: g.bootstrap.gc $ - ${g.bootstrap.srcDir}/blueprint/context.go $ - ${g.bootstrap.srcDir}/blueprint/live_tracker.go $ - ${g.bootstrap.srcDir}/blueprint/mangle.go $ - ${g.bootstrap.srcDir}/blueprint/module_ctx.go $ - ${g.bootstrap.srcDir}/blueprint/ninja_defs.go $ - ${g.bootstrap.srcDir}/blueprint/ninja_strings.go $ - ${g.bootstrap.srcDir}/blueprint/ninja_writer.go $ - ${g.bootstrap.srcDir}/blueprint/package_ctx.go $ - ${g.bootstrap.srcDir}/blueprint/scope.go $ - ${g.bootstrap.srcDir}/blueprint/singleton_ctx.go $ - ${g.bootstrap.srcDir}/blueprint/unpack.go | ${g.bootstrap.gcCmd} $ + ${g.bootstrap.srcDir}/context.go ${g.bootstrap.srcDir}/live_tracker.go $ + ${g.bootstrap.srcDir}/mangle.go ${g.bootstrap.srcDir}/module_ctx.go $ + ${g.bootstrap.srcDir}/ninja_defs.go $ + ${g.bootstrap.srcDir}/ninja_strings.go $ + ${g.bootstrap.srcDir}/ninja_writer.go $ + ${g.bootstrap.srcDir}/package_ctx.go ${g.bootstrap.srcDir}/scope.go $ + ${g.bootstrap.srcDir}/singleton_ctx.go ${g.bootstrap.srcDir}/unpack.go $ + | ${g.bootstrap.gcCmd} $ .bootstrap/blueprint-parser/pkg/blueprint/parser.a $ .bootstrap/blueprint-proptools/pkg/blueprint/proptools.a incFlags = -I .bootstrap/blueprint-parser/pkg -I .bootstrap/blueprint-proptools/pkg @@ -76,15 +73,14 @@ default .bootstrap/blueprint/pkg/blueprint.a # Module: blueprint-bootstrap # Type: bootstrap_go_package # Factory: blueprint/bootstrap.newGoPackageModule -# Defined: Blueprints:44:1 +# Defined: Blueprints:47:1 build .bootstrap/blueprint-bootstrap/pkg/blueprint/bootstrap.a: g.bootstrap.gc $ - ${g.bootstrap.srcDir}/blueprint/bootstrap/bootstrap.go $ - ${g.bootstrap.srcDir}/blueprint/bootstrap/cleanup.go $ - ${g.bootstrap.srcDir}/blueprint/bootstrap/command.go $ - ${g.bootstrap.srcDir}/blueprint/bootstrap/config.go $ - ${g.bootstrap.srcDir}/blueprint/bootstrap/doc.go | $ - ${g.bootstrap.gcCmd} $ + ${g.bootstrap.srcDir}/bootstrap/bootstrap.go $ + ${g.bootstrap.srcDir}/bootstrap/cleanup.go $ + ${g.bootstrap.srcDir}/bootstrap/command.go $ + ${g.bootstrap.srcDir}/bootstrap/config.go $ + ${g.bootstrap.srcDir}/bootstrap/doc.go | ${g.bootstrap.gcCmd} $ .bootstrap/blueprint-parser/pkg/blueprint/parser.a $ .bootstrap/blueprint-proptools/pkg/blueprint/proptools.a $ .bootstrap/blueprint/pkg/blueprint.a $ @@ -98,11 +94,10 @@ default .bootstrap/blueprint-bootstrap/pkg/blueprint/bootstrap.a # Module: blueprint-deptools # Type: bootstrap_go_package # Factory: blueprint/bootstrap.newGoPackageModule -# Defined: Blueprints:25:1 +# Defined: Blueprints:28:1 build .bootstrap/blueprint-deptools/pkg/blueprint/deptools.a: g.bootstrap.gc $ - ${g.bootstrap.srcDir}/blueprint/deptools/depfile.go | $ - ${g.bootstrap.gcCmd} + ${g.bootstrap.srcDir}/deptools/depfile.go | ${g.bootstrap.gcCmd} pkgPath = blueprint/deptools default .bootstrap/blueprint-deptools/pkg/blueprint/deptools.a @@ -113,8 +108,10 @@ default .bootstrap/blueprint-deptools/pkg/blueprint/deptools.a # Defined: Blueprints:19:1 build .bootstrap/blueprint-parser/pkg/blueprint/parser.a: g.bootstrap.gc $ - ${g.bootstrap.srcDir}/blueprint/parser/parser.go | $ - ${g.bootstrap.gcCmd} + ${g.bootstrap.srcDir}/parser/modify.go $ + ${g.bootstrap.srcDir}/parser/parser.go $ + ${g.bootstrap.srcDir}/parser/printer.go $ + ${g.bootstrap.srcDir}/parser/sort.go | ${g.bootstrap.gcCmd} pkgPath = blueprint/parser default .bootstrap/blueprint-parser/pkg/blueprint/parser.a @@ -122,12 +119,11 @@ default .bootstrap/blueprint-parser/pkg/blueprint/parser.a # Module: blueprint-pathtools # Type: bootstrap_go_package # Factory: blueprint/bootstrap.newGoPackageModule -# Defined: Blueprints:31:1 +# Defined: Blueprints:34:1 build .bootstrap/blueprint-pathtools/pkg/blueprint/pathtools.a: g.bootstrap.gc $ - ${g.bootstrap.srcDir}/blueprint/pathtools/lists.go $ - ${g.bootstrap.srcDir}/blueprint/pathtools/glob.go | $ - ${g.bootstrap.gcCmd} + ${g.bootstrap.srcDir}/pathtools/lists.go $ + ${g.bootstrap.srcDir}/pathtools/glob.go | ${g.bootstrap.gcCmd} pkgPath = blueprint/pathtools default .bootstrap/blueprint-pathtools/pkg/blueprint/pathtools.a @@ -135,23 +131,63 @@ default .bootstrap/blueprint-pathtools/pkg/blueprint/pathtools.a # Module: blueprint-proptools # Type: bootstrap_go_package # Factory: blueprint/bootstrap.newGoPackageModule -# Defined: Blueprints:38:1 +# Defined: Blueprints:41:1 build .bootstrap/blueprint-proptools/pkg/blueprint/proptools.a: g.bootstrap.gc $ - ${g.bootstrap.srcDir}/blueprint/proptools/proptools.go | $ - ${g.bootstrap.gcCmd} + ${g.bootstrap.srcDir}/proptools/proptools.go | ${g.bootstrap.gcCmd} pkgPath = blueprint/proptools default .bootstrap/blueprint-proptools/pkg/blueprint/proptools.a +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# Module: bpfmt +# Type: bootstrap_go_binary +# Factory: blueprint/bootstrap.newGoBinaryModule +# Defined: Blueprints:66:1 + +build .bootstrap/bpfmt/obj/bpfmt.a: g.bootstrap.gc $ + ${g.bootstrap.srcDir}/bpfmt/bpfmt.go | ${g.bootstrap.gcCmd} $ + .bootstrap/blueprint-parser/pkg/blueprint/parser.a + incFlags = -I .bootstrap/blueprint-parser/pkg + pkgPath = bpfmt +default .bootstrap/bpfmt/obj/bpfmt.a + +build .bootstrap/bpfmt/obj/a.out: g.bootstrap.link $ + .bootstrap/bpfmt/obj/bpfmt.a | ${g.bootstrap.linkCmd} + libDirFlags = -L .bootstrap/blueprint-parser/pkg +default .bootstrap/bpfmt/obj/a.out + +build .bootstrap/bin/bpfmt: g.bootstrap.cp .bootstrap/bpfmt/obj/a.out +default .bootstrap/bin/bpfmt + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# Module: bpmodify +# Type: bootstrap_go_binary +# Factory: blueprint/bootstrap.newGoBinaryModule +# Defined: Blueprints:72:1 + +build .bootstrap/bpmodify/obj/bpmodify.a: g.bootstrap.gc $ + ${g.bootstrap.srcDir}/bpmodify/bpmodify.go | ${g.bootstrap.gcCmd} $ + .bootstrap/blueprint-parser/pkg/blueprint/parser.a + incFlags = -I .bootstrap/blueprint-parser/pkg + pkgPath = bpmodify +default .bootstrap/bpmodify/obj/bpmodify.a + +build .bootstrap/bpmodify/obj/a.out: g.bootstrap.link $ + .bootstrap/bpmodify/obj/bpmodify.a | ${g.bootstrap.linkCmd} + libDirFlags = -L .bootstrap/blueprint-parser/pkg +default .bootstrap/bpmodify/obj/a.out + +build .bootstrap/bin/bpmodify: g.bootstrap.cp .bootstrap/bpmodify/obj/a.out +default .bootstrap/bin/bpmodify + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Module: minibp # Type: bootstrap_go_binary # Factory: blueprint/bootstrap.newGoBinaryModule -# Defined: Blueprints:57:1 +# Defined: Blueprints:60:1 build .bootstrap/minibp/obj/minibp.a: g.bootstrap.gc $ - ${g.bootstrap.srcDir}/blueprint/bootstrap/minibp/main.go | $ - ${g.bootstrap.gcCmd} $ + ${g.bootstrap.srcDir}/bootstrap/minibp/main.go | ${g.bootstrap.gcCmd} $ .bootstrap/blueprint-parser/pkg/blueprint/parser.a $ .bootstrap/blueprint-proptools/pkg/blueprint/proptools.a $ .bootstrap/blueprint/pkg/blueprint.a $ @@ -186,7 +222,8 @@ rule s.bootstrap.minibp generator = true build .bootstrap/main.ninja.in: s.bootstrap.bigbp $ - ${g.bootstrap.srcDir}/Blueprints | .bootstrap/bin/minibp + ${g.bootstrap.srcDir}/Blueprints | .bootstrap/bin/bpfmt $ + .bootstrap/bin/bpmodify .bootstrap/bin/minibp default .bootstrap/main.ninja.in build .bootstrap/notAFile: phony default .bootstrap/notAFile diff --git a/blueprint/context.go b/context.go similarity index 100% rename from blueprint/context.go rename to context.go diff --git a/blueprint/context_test.go b/context_test.go similarity index 100% rename from blueprint/context_test.go rename to context_test.go diff --git a/blueprint/deptools/depfile.go b/deptools/depfile.go similarity index 100% rename from blueprint/deptools/depfile.go rename to deptools/depfile.go diff --git a/blueprint/live_tracker.go b/live_tracker.go similarity index 100% rename from blueprint/live_tracker.go rename to live_tracker.go diff --git a/blueprint/mangle.go b/mangle.go similarity index 100% rename from blueprint/mangle.go rename to mangle.go diff --git a/blueprint/module_ctx.go b/module_ctx.go similarity index 100% rename from blueprint/module_ctx.go rename to module_ctx.go diff --git a/blueprint/ninja_defs.go b/ninja_defs.go similarity index 100% rename from blueprint/ninja_defs.go rename to ninja_defs.go diff --git a/blueprint/ninja_strings.go b/ninja_strings.go similarity index 100% rename from blueprint/ninja_strings.go rename to ninja_strings.go diff --git a/blueprint/ninja_strings_test.go b/ninja_strings_test.go similarity index 100% rename from blueprint/ninja_strings_test.go rename to ninja_strings_test.go diff --git a/blueprint/ninja_writer.go b/ninja_writer.go similarity index 100% rename from blueprint/ninja_writer.go rename to ninja_writer.go diff --git a/blueprint/ninja_writer_test.go b/ninja_writer_test.go similarity index 100% rename from blueprint/ninja_writer_test.go rename to ninja_writer_test.go diff --git a/blueprint/package_ctx.go b/package_ctx.go similarity index 100% rename from blueprint/package_ctx.go rename to package_ctx.go diff --git a/blueprint/parser/modify.go b/parser/modify.go similarity index 100% rename from blueprint/parser/modify.go rename to parser/modify.go diff --git a/blueprint/parser/parser.go b/parser/parser.go similarity index 100% rename from blueprint/parser/parser.go rename to parser/parser.go diff --git a/blueprint/parser/parser_test.go b/parser/parser_test.go similarity index 100% rename from blueprint/parser/parser_test.go rename to parser/parser_test.go diff --git a/blueprint/parser/printer.go b/parser/printer.go similarity index 100% rename from blueprint/parser/printer.go rename to parser/printer.go diff --git a/blueprint/parser/printer_test.go b/parser/printer_test.go similarity index 100% rename from blueprint/parser/printer_test.go rename to parser/printer_test.go diff --git a/blueprint/parser/sort.go b/parser/sort.go similarity index 100% rename from blueprint/parser/sort.go rename to parser/sort.go diff --git a/blueprint/pathtools/glob.go b/pathtools/glob.go similarity index 100% rename from blueprint/pathtools/glob.go rename to pathtools/glob.go diff --git a/blueprint/pathtools/lists.go b/pathtools/lists.go similarity index 100% rename from blueprint/pathtools/lists.go rename to pathtools/lists.go diff --git a/blueprint/proptools/proptools.go b/proptools/proptools.go similarity index 100% rename from blueprint/proptools/proptools.go rename to proptools/proptools.go diff --git a/blueprint/scope.go b/scope.go similarity index 100% rename from blueprint/scope.go rename to scope.go diff --git a/blueprint/singleton_ctx.go b/singleton_ctx.go similarity index 100% rename from blueprint/singleton_ctx.go rename to singleton_ctx.go diff --git a/blueprint/unpack.go b/unpack.go similarity index 100% rename from blueprint/unpack.go rename to unpack.go diff --git a/blueprint/unpack_test.go b/unpack_test.go similarity index 100% rename from blueprint/unpack_test.go rename to unpack_test.go