Streamline AndroidMk generation

Add AndroidMkEmitAssignList to emit a line to assign the items from
the given list of string arrays.

Test: treehugger
Change-Id: Id5acbef38ea4e91349bd2461f226db352d4b8123
This commit is contained in:
Sasha Smundak
2022-12-08 10:41:33 -08:00
parent 18ac53b4d0
commit dcb6129269
5 changed files with 55 additions and 58 deletions

View File

@@ -240,7 +240,7 @@ func (bpf *bpf) AndroidMk() android.AndroidMkData {
fmt.Fprintln(w, "include $(CLEAR_VARS)", " # bpf.bpf")
fmt.Fprintln(w, "LOCAL_MODULE := ", name)
data.Entries.WriteLicenseVariables(w)
fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES :=", strings.Join(names, " "))
android.AndroidMkEmitAssignList(w, "LOCAL_REQUIRED_MODULES", names)
fmt.Fprintln(w, "include $(BUILD_PHONY_PACKAGE)")
},
}