Add androidmk to Blueprints

Change-Id: I2c8f17bda7ff0b5fc95a80e5bf72776f6e23be05
diff --git a/Blueprints b/Blueprints
index ffba400..057d27c 100644
--- a/Blueprints
+++ b/Blueprints
@@ -99,6 +99,38 @@
     ],
 }
 
+//
+// 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 aa03b75..b3447c7 100644
--- a/build.ninja.in
+++ b/build.ninja.in
@@ -49,6 +49,49 @@
     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:
 # Type:    bootstrap_go_package
@@ -391,8 +434,8 @@
     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