Use += for both assignments to LOCAL_C_INCLUDES
include_dirs and local_include_dirs properties both translate to
LOCAL_C_INCLUDES. Use += for both assignments so they don't
clobber eachother.
Change-Id: Ie9e5e28ecd5a7ca76ab2a981e7d50d2c9b93ad92
diff --git a/androidbp/cmd/androidbp.go b/androidbp/cmd/androidbp.go
index a5cf91a..ef7a364 100644
--- a/androidbp/cmd/androidbp.go
+++ b/androidbp/cmd/androidbp.go
@@ -218,6 +218,19 @@
return
}
+func appendAssign(name string, prop *bpparser.Property, suffix *string) ([]string, error) {
+ if suffix != nil {
+ name += "_" + *suffix
+ }
+ val, err := valueToString(prop.Value)
+ if err != nil {
+ return nil, err
+ }
+ return []string{
+ fmt.Sprintf("%s += %s", name, val),
+ }, nil
+}
+
func prependLocalPath(name string, prop *bpparser.Property, suffix *string) ([]string, error) {
if suffix != nil {
name += "_" + *suffix
@@ -227,7 +240,7 @@
return nil, err
}
return []string{
- fmt.Sprintf("%s := $(addprefix $(LOCAL_PATH)/,%s)\n", name, val),
+ fmt.Sprintf("%s += $(addprefix $(LOCAL_PATH)/,%s)", name, val),
}, nil
}