From 8003131d5a09ccc5c9fbaf8ddca93e5d8c4e401f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Sat, 14 Mar 2015 14:28:22 -0700 Subject: [PATCH] Add androidmk to Blueprints Change-Id: I2c8f17bda7ff0b5fc95a80e5bf72776f6e23be05 --- Blueprints | 32 ++++++++++++++++++++++++++++++++ build.ninja.in | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 77 insertions(+), 2 deletions(-) diff --git a/Blueprints b/Blueprints index ffba400e0..057d27c34 100644 --- a/Blueprints +++ b/Blueprints @@ -99,6 +99,38 @@ bootstrap_go_package { ], } +// +// androidmk Android.mk to Blueprints translator +// + +bootstrap_go_binary { + name: "androidmk", + srcs: [ + "androidmk/cmd/androidmk/android.go", + "androidmk/cmd/androidmk/androidmk.go", + "androidmk/cmd/androidmk/values.go", + ], + deps: [ + "androidmk-parser", + "blueprint-parser", + ], +} + +bootstrap_go_package { + name: "androidmk-parser", + pkgPath: "android/soong/androidmk/parser", + srcs: [ + "androidmk/parser/make_strings.go", + "androidmk/parser/makething.go", + "androidmk/parser/parser.go", + "androidmk/parser/scope.go", + ], +} + +// +// C static libraries extracted from the gcc toolchain +// + toolchain_library { name: "libatomic", } diff --git a/build.ninja.in b/build.ninja.in index aa03b7531..b3447c744 100644 --- a/build.ninja.in +++ b/build.ninja.in @@ -48,6 +48,49 @@ rule g.bootstrap.link command = GOROOT='${g.bootstrap.goRoot}' ${g.bootstrap.linkCmd} -o ${out} ${libDirFlags} ${in} description = ${g.bootstrap.goChar}l ${out} +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# Module: androidmk +# Variant: +# Type: bootstrap_go_binary +# Factory: blueprint/bootstrap.newGoBinaryModule +# Defined: build/soong/Blueprints:106:1 + +build .bootstrap/androidmk/obj/androidmk.a: g.bootstrap.gc $ + ${g.bootstrap.srcDir}/build/soong/androidmk/cmd/androidmk/android.go $ + ${g.bootstrap.srcDir}/build/soong/androidmk/cmd/androidmk/androidmk.go $ + ${g.bootstrap.srcDir}/build/soong/androidmk/cmd/androidmk/values.go | $ + ${g.bootstrap.gcCmd} $ + .bootstrap/androidmk-parser/pkg/android/soong/androidmk/parser.a $ + .bootstrap/blueprint-parser/pkg/blueprint/parser.a + incFlags = -I .bootstrap/androidmk-parser/pkg -I .bootstrap/blueprint-parser/pkg + pkgPath = androidmk +default .bootstrap/androidmk/obj/androidmk.a + +build .bootstrap/androidmk/obj/a.out: g.bootstrap.link $ + .bootstrap/androidmk/obj/androidmk.a | ${g.bootstrap.linkCmd} + libDirFlags = -L .bootstrap/androidmk-parser/pkg -L .bootstrap/blueprint-parser/pkg +default .bootstrap/androidmk/obj/a.out + +build .bootstrap/bin/androidmk: g.bootstrap.cp .bootstrap/androidmk/obj/a.out +default .bootstrap/bin/androidmk + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# Module: androidmk-parser +# Variant: +# Type: bootstrap_go_package +# Factory: blueprint/bootstrap.newGoPackageModule +# Defined: build/soong/Blueprints:119:1 + +build .bootstrap/androidmk-parser/pkg/android/soong/androidmk/parser.a: $ + g.bootstrap.gc $ + ${g.bootstrap.srcDir}/build/soong/androidmk/parser/make_strings.go $ + ${g.bootstrap.srcDir}/build/soong/androidmk/parser/makething.go $ + ${g.bootstrap.srcDir}/build/soong/androidmk/parser/parser.go $ + ${g.bootstrap.srcDir}/build/soong/androidmk/parser/scope.go | $ + ${g.bootstrap.gcCmd} + pkgPath = android/soong/androidmk/parser +default .bootstrap/androidmk-parser/pkg/android/soong/androidmk/parser.a + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Module: blueprint # Variant: @@ -391,8 +434,8 @@ rule s.bootstrap.minibp generator = true build .bootstrap/main.ninja.in: s.bootstrap.bigbp $ - ${g.bootstrap.srcDir}/Blueprints | .bootstrap/bin/bpfmt $ - .bootstrap/bin/bpmodify .bootstrap/bin/minibp $ + ${g.bootstrap.srcDir}/Blueprints | .bootstrap/bin/androidmk $ + .bootstrap/bin/bpfmt .bootstrap/bin/bpmodify .bootstrap/bin/minibp $ .bootstrap/bin/soong_build .bootstrap/bin/soong_glob default .bootstrap/main.ninja.in build .bootstrap/notAFile: phony