androidbp: Add static_executable, fix suffix
Add a conversion for static_executable -> LOCAL_FORCE_STATIC_EXECUTABLE
In androidmk, LOCAL_MODULE_STEM values are converted to 'suffix' values
if it is in the form $(LOCAL_MODULE)<suffix>. Do the opposite in
androidbp.
Change-Id: Ia645cf21c0def3d055188ab5b021344bb50aa58e
diff --git a/androidbp/cmd/androidbp.go b/androidbp/cmd/androidbp.go
index ba2eda4..386e52c 100644
--- a/androidbp/cmd/androidbp.go
+++ b/androidbp/cmd/androidbp.go
@@ -178,6 +178,15 @@
}
}
+func prependLocalModule(name string, prop *bpparser.Property, suffix *string) (computedProps []string) {
+ if suffix != nil {
+ name += "_" + *suffix
+ }
+ return []string {
+ fmt.Sprintf("%s := $(LOCAL_MODULE)%s\n", name, valueToString(prop)),
+ }
+}
+
func (w *androidMkWriter) lookupMap(parent bpparser.Value) (mapValue []*bpparser.Property) {
if parent.Variable != "" {
mapValue = w.mapScope[parent.Variable]